diff options
author | sapier <Sapier at GMX dot net> | 2014-06-14 11:22:09 +0200 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2014-06-22 00:08:55 +0200 |
commit | d4245e6cac58a57ad2498eee2c17e851f3292296 (patch) | |
tree | 9e3988d50bf69aa1eaff97cfbedffe23f36a2b9b /builtin/mainmenu | |
parent | a0097c6bfab026d5655ef7a9ba127cb90a80798c (diff) | |
download | minetest-d4245e6cac58a57ad2498eee2c17e851f3292296.tar.gz minetest-d4245e6cac58a57ad2498eee2c17e851f3292296.tar.bz2 minetest-d4245e6cac58a57ad2498eee2c17e851f3292296.zip |
Support for scalable font and gui elements
Fix positioning of tabheader in order to be usable for scaling GUIs
WARNING: this changes position of current tabheaders, mods have to adjust!
Diffstat (limited to 'builtin/mainmenu')
-rw-r--r-- | builtin/mainmenu/init.lua | 12 | ||||
-rw-r--r-- | builtin/mainmenu/store.lua | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/builtin/mainmenu/init.lua b/builtin/mainmenu/init.lua index ab2b8d80c..28bf81c90 100644 --- a/builtin/mainmenu/init.lua +++ b/builtin/mainmenu/init.lua @@ -83,11 +83,11 @@ local function init_globals() menudata.worldlist:add_sort_mechanism("alphabetic",sort_worlds_alphabetic) menudata.worldlist:set_sortmode("alphabetic") - + mm_texture.init() - + --create main tabview - local tv_main = tabview_create("maintab",{x=12,y=5.2},{x=-0.3,y=-0.99}) + local tv_main = tabview_create("maintab",{x=12,y=5.2},{x=0,y=0}) tv_main:set_autosave_tab(true) tv_main:add(tab_singleplayer) tv_main:add(tab_multiplayer) @@ -96,9 +96,9 @@ local function init_globals() tv_main:add(tab_texturepacks) tv_main:add(tab_mods) tv_main:add(tab_credits) - + tv_main:set_global_event_handler(main_event_handler) - + tv_main:set_tab(core.setting_get("maintab_LAST")) ui.set_default("maintab") tv_main:show() @@ -107,7 +107,7 @@ local function init_globals() modstore.init({x=12,y=8},4,3) ui.update() - + core.sound_play("main_menu", true) end diff --git a/builtin/mainmenu/store.lua b/builtin/mainmenu/store.lua index 48433e58d..f0ddfce8f 100644 --- a/builtin/mainmenu/store.lua +++ b/builtin/mainmenu/store.lua @@ -78,8 +78,8 @@ function modstore.init(size, unsortedmods, searchmods) modstore.current_list = nil - modstore.tv_store = tabview_create("modstore",size,{x=-0.3,y=-0.99}) - + modstore.tv_store = tabview_create("modstore",size,{x=0,y=0}) + modstore.tv_store:set_global_event_handler(modstore.handle_events) modstore.tv_store:add( @@ -307,7 +307,7 @@ function modstore.handle_buttons(parent, fields, name, data) return true end end - + return false end |