2016-05-06 10:56:20 +00:00
|
|
|
-- In this file we define functions that serves for help windows
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------
|
|
|
|
-- create the game namespace without reseting if already created in an other file.
|
|
|
|
if (help==nil) then
|
2016-10-14 11:11:34 +00:00
|
|
|
help = {}
|
2016-05-06 10:56:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------
|
|
|
|
--
|
|
|
|
function help:closeCSBrowserHeader()
|
2016-10-14 11:11:34 +00:00
|
|
|
local ui = getUI('ui:interface:cs_browser')
|
2016-05-06 10:56:20 +00:00
|
|
|
|
|
|
|
-- save size
|
2016-10-14 11:11:34 +00:00
|
|
|
ui_cs_browser_h = ui.h
|
|
|
|
ui_cs_browser_w = ui.w
|
2016-05-06 10:56:20 +00:00
|
|
|
|
|
|
|
-- reduce window size
|
2016-10-14 11:11:34 +00:00
|
|
|
ui.pop_min_h = 32
|
|
|
|
ui.h = 0
|
|
|
|
ui.w = 216
|
2016-05-06 10:56:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------------------------------------
|
|
|
|
--
|
|
|
|
function help:openCSBrowserHeader()
|
2016-10-14 11:11:34 +00:00
|
|
|
local ui = getUI('ui:interface:cs_browser')
|
|
|
|
ui.pop_min_h = 96
|
2016-05-06 10:56:20 +00:00
|
|
|
|
|
|
|
-- set size from saved values
|
|
|
|
if (ui_cs_browser_h ~= nil) then
|
2016-10-14 11:11:34 +00:00
|
|
|
ui.h = ui_cs_browser_h
|
2016-05-06 10:56:20 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
if (ui_cs_browser_w ~= nil) then
|
2016-10-14 11:11:34 +00:00
|
|
|
ui.w = ui_cs_browser_w
|
2016-05-06 10:56:20 +00:00
|
|
|
end
|
|
|
|
end
|