Files
itgmania212121/Themes/default/Graphics/ScreenTitleMenu NetworkStatus.lua
T

30 lines
881 B
Lua
Raw Normal View History

2013-07-18 18:02:01 -04:00
local netConnected = IsNetConnected();
local loggedOnSMO = IsNetSMOnline();
local t = Def.ActorFrame{
2017-08-08 01:07:34 -06:00
LoadFont("Common Condensed") .. {
2013-07-18 18:02:01 -04:00
InitCommand=cmd(uppercase,true;zoom,0.75;shadowlength,1;horizalign,left);
BeginCommand=function(self)
-- check network status
if netConnected then
2017-08-08 01:07:34 -06:00
self:diffuse( color("#268129") );
self:diffusebottomedge( color("#153F17") );
2013-07-18 18:02:01 -04:00
self:settext( Screen.String("Network OK") );
else
2017-08-08 01:07:34 -06:00
self:diffuse( color("#4F1B34") );
2013-07-18 18:02:01 -04:00
self:settext( Screen.String("Offline") );
end;
end;
};
};
if netConnected then
2017-08-08 01:07:34 -06:00
t[#t+1] = LoadFont("Common Condensed") .. {
InitCommand=cmd(y,16;horizalign,left;zoom,0.5875;shadowlength,1;diffuse,color("#268129");diffusebottomedge,color("#153F17"););
2013-07-18 18:02:01 -04:00
BeginCommand=function(self)
self:settext( string.format(Screen.String("Connected to %s"), GetServerName()) );
end;
};
end;
2010-01-26 21:00:30 -06:00
return t;