Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- A function to draw the date and time.
- function NEXUS:DrawDateTime()
- local colorWhite = nexus.schema.GetColor("white");
- local info = {
- width = ScrW() * 0.1,
- x = 8,
- y = 8
- };
- if ( nexus.mount.Call("PlayerCanSeeDateTime") ) then
- local dateTimeFont = nexus.schema.GetFont("date_time_text");
- local dateString = nexus.date.GetString();
- local timeString = nexus.time.GetString();
- local dayName = nexus.time.GetDayName();
- local text = string.upper(dateString..". "..dayName..", "..timeString..".");
- self:OverrideMainFont(dateTimeFont);
- info.y = self:DrawInfo(text, info.x, info.y, colorWhite, 255, true);
- self:OverrideMainFont(false);
- local textWidth, textHeight = NEXUS:GetCachedTextSize(dateTimeFont, text);
- if (textWidth and textHeight) then
- info.width = textWidth;
- end;
- end;
- self:DrawBars(info);
- nexus.mount.Call("NexusDateTimeDrawn", info);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement