]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - builtin/mainmenu/init.lua
Mainmenu: Brighter text colours for readability
[dragonfireclient.git] / builtin / mainmenu / init.lua
index 6dd345ff476c1ca43f74a6c6519b4e02246b769f..79e6d5c029a3911c42b71a18098f9966006ca46c 100644 (file)
@@ -16,9 +16,9 @@
 --51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 mt_color_grey  = "#AAAAAA"
-mt_color_blue  = "#0000DD"
-mt_color_green = "#00DD00"
-mt_color_dark_green = "#003300"
+mt_color_blue  = "#6389FF"
+mt_color_green = "#72FF63"
+mt_color_dark_green = "#25C191"
 
 --for all other colors ask sfan5 to complete his work!
 
@@ -77,13 +77,28 @@ local function init_globals()
 
        if PLATFORM == "Android" then
                local world_list = core.get_worlds()
-               local world_index = table.indexof(world_list, "singleplayerworld")
+               local world_index
+
+               local found_singleplayerworld = false
+               for i, world in ipairs(world_list) do
+                       if world.name == "singleplayerworld" then
+                               found_singleplayerworld = true
+                               world_index = i
+                               break
+                       end
+               end
 
-               if world_index == -1 then
+               if not found_singleplayerworld then
                        core.create_world("singleplayerworld", 1)
 
                        world_list = core.get_worlds()
-                       world_index = table.indexof(world_list, "singleplayerworld")
+
+                       for i, world in ipairs(world_list) do
+                               if world.name == "singleplayerworld" then
+                                       world_index = i
+                                       break
+                               end
+                       end
                end
 
                gamedata.worldindex = world_index
@@ -113,7 +128,7 @@ local function init_globals()
        end
 
        -- Create main tabview
-       local tv_main = tabview_create("maintab", {x = 12, y = 5.2}, {x = 0, y = 0})
+       local tv_main = tabview_create("maintab", {x = 12, y = 5.4}, {x = 0, y = 0})
 
        if PLATFORM == "Android" then
                tv_main:add(tabs.simple_main)