aboutsummaryrefslogtreecommitdiff
path: root/builtin/mainmenu
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-03-16 17:32:30 +0100
committerLoic Blot <loic.blot@unix-experience.fr>2015-03-16 20:04:00 +0100
commit16b961b2eb68f2e9a37e218f3fb4f2e451a3a993 (patch)
tree002cadf609f6273d0a3787500c44aa51fd051721 /builtin/mainmenu
parentd63df4ecb1106141e76f4a223678dc2431f26cbd (diff)
downloadminetest-16b961b2eb68f2e9a37e218f3fb4f2e451a3a993.tar.gz
minetest-16b961b2eb68f2e9a37e218f3fb4f2e451a3a993.tar.bz2
minetest-16b961b2eb68f2e9a37e218f3fb4f2e451a3a993.zip
Android: Fix auto-entry of server address and port in mainmenu
Fixes #2497.
Diffstat (limited to 'builtin/mainmenu')
-rw-r--r--builtin/mainmenu/tab_simple_main.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/mainmenu/tab_simple_main.lua b/builtin/mainmenu/tab_simple_main.lua
index b9a6b650f..995c72132 100644
--- a/builtin/mainmenu/tab_simple_main.lua
+++ b/builtin/mainmenu/tab_simple_main.lua
@@ -98,12 +98,12 @@ local function main_button_handler(tabview, fields, name, tabdata)
end
if fields["favourites"] ~= nil then
- local event = core.explode_textlist_event(fields["favourites"])
+ local event = core.explode_table_event(fields["favourites"])
if event.type == "CHG" then
- if event.index <= #menudata.favorites then
- local address = menudata.favorites[event.index].address
- local port = menudata.favorites[event.index].port
+ if event.row <= #menudata.favorites then
+ local address = menudata.favorites[event.row].address
+ local port = menudata.favorites[event.row].port
if address ~= nil and
port ~= nil then
@@ -111,7 +111,7 @@ local function main_button_handler(tabview, fields, name, tabdata)
core.setting_set("remote_port",port)
end
- tabdata.fav_selected = event.index
+ tabdata.fav_selected = event.row
end
end
return true