24 lines
972 B
Plaintext
24 lines
972 B
Plaintext
|
local ratio = utils_xml.screen_ratio()
|
||
|
|
||
|
local uisleep_initcontrols = ui_sleep_dialog.UISleep.InitControls
|
||
|
ui_sleep_dialog.UISleep.InitControls = function(self)
|
||
|
uisleep_initcontrols(self)
|
||
|
self.wide = false
|
||
|
end
|
||
|
|
||
|
local uisleep_initialize = ui_sleep_dialog.UISleep.Initialize
|
||
|
ui_sleep_dialog.UISleep.Initialize = function(self)
|
||
|
uisleep_initialize(self)
|
||
|
self.sleep_static:SetWndSize(vector2():set(self.sleep_static:GetWidth() * ratio, self.sleep_static:GetHeight() ))
|
||
|
self.sleep_static2:SetWndSize(vector2():set(self.sleep_static2:GetWidth() * ratio, self.sleep_static:GetHeight() ))
|
||
|
self.sleep_static2:SetWndPos(vector2():set(self.sleep_static:GetWndPos().x + self.sleep_static:GetWidth(), self.sleep_static:GetWndPos().y ))
|
||
|
end
|
||
|
|
||
|
local uisleep_update = ui_sleep_dialog.UISleep.Update
|
||
|
ui_sleep_dialog.UISleep.Update = function(self)
|
||
|
uisleep_update(self)
|
||
|
if self:IsShown() then
|
||
|
self.st_marker:SetWndPos(vector2():set(self.st_marker:GetWndPos().x * ratio, 5))
|
||
|
end
|
||
|
end
|