Define info_panel_y multiple times.
Bug #1166100 reported by
Kyran Jackson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Stratagus |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
In scripts/ui.lua there is a line:
local info_panel_y = 160
I'd like to do something like the following:
if ((Video.Width == 800) and (Video.Height == 480)) then
local info_panel_y = 160
else
local info_panel_y = Video.Height - 136 - 24 - 16
end
However, this results in a crash. Is there a way to get this to work?
Changed in stratagus: | |
importance: | Undecided → Wishlist |
To post a comment you must log in.
local and block in lua: http:// www.lua. org/pil/ 4.2.html
You should try (untested).
-- 8< --
local info_panel_y
if ((Video.Width == 800) and (Video.Height == 480)) then
info_panel_y = 160
else
info_panel_y = Video.Height - 136 - 24 - 16
end
-- >8 --