Skip to content

Commit

Permalink
Use fixed size for builtin menus on non-android platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
celeron55 committed Feb 18, 2015
1 parent 49f84b7 commit 4d744cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion builtin/mainmenu/init.lua
Expand Up @@ -139,7 +139,11 @@ local function init_globals()
tv_main:add(tab_credits)

tv_main:set_global_event_handler(main_event_handler)
tv_main:set_fixed_size(false)
if PLATFORM ~= "Android" then
tv_main:set_fixed_size(true)
else
tv_main:set_fixed_size(false)
end

if not (PLATFORM == "Android") then
tv_main:set_tab(core.setting_get("maintab_LAST"))
Expand Down
4 changes: 4 additions & 0 deletions src/game.cpp
Expand Up @@ -1043,7 +1043,11 @@ static inline void create_formspec_menu(GUIFormSpecMenu **cur_formspec,
}
}

#ifdef __ANDROID__
#define SIZE_TAG "size[11,5.5]"
#else
#define SIZE_TAG "size[11,5.5,true]" // Fixed size on desktop
#endif

static void show_chat_menu(GUIFormSpecMenu **cur_formspec,
InventoryManager *invmgr, IGameDef *gamedef,
Expand Down

0 comments on commit 4d744cf

Please sign in to comment.