mirror of
https://github.com/MCLx86/xtreemtest.git
synced 2025-01-18 14:08:48 +01:00
Updated the main menu
This commit is contained in:
parent
b869344b6c
commit
17c34f9eb6
@ -29,6 +29,11 @@ function mm_game_theme.init()
|
||||
mm_game_theme.gameid = nil
|
||||
|
||||
mm_game_theme.music_handle = nil
|
||||
|
||||
core.set_clouds(false)
|
||||
if not have_bg then
|
||||
mm_game_theme.set_dirt_bg()
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
@ -63,11 +68,7 @@ function mm_game_theme.reset()
|
||||
mm_game_theme.set_generic("header")
|
||||
|
||||
if not have_bg then
|
||||
if core.settings:get_bool("menu_clouds") then
|
||||
core.set_clouds(true)
|
||||
else
|
||||
mm_game_theme.set_dirt_bg()
|
||||
end
|
||||
mm_game_theme.set_dirt_bg()
|
||||
end
|
||||
|
||||
if mm_game_theme.music_handle ~= nil then
|
||||
@ -93,12 +94,7 @@ function mm_game_theme.update_game(gamedetails)
|
||||
core.set_clouds(false)
|
||||
|
||||
if not have_bg then
|
||||
|
||||
if core.settings:get_bool("menu_clouds") then
|
||||
core.set_clouds(true)
|
||||
else
|
||||
mm_game_theme.set_dirt_bg()
|
||||
end
|
||||
mm_game_theme.set_dirt_bg()
|
||||
end
|
||||
|
||||
mm_game_theme.set_game("footer",gamedetails)
|
||||
@ -182,7 +178,7 @@ end
|
||||
--------------------------------------------------------------------------------
|
||||
function mm_game_theme.set_dirt_bg()
|
||||
if mm_game_theme.texturepack ~= nil then
|
||||
local path = mm_game_theme.texturepack .. DIR_DELIM .."default_dirt.png"
|
||||
local path = defaulttexturedir .. "bg.png"
|
||||
if core.set_background("background", path, true, 128) then
|
||||
return true
|
||||
end
|
||||
|
@ -56,6 +56,7 @@ tabs.content = dofile(menupath .. DIR_DELIM .. "tab_content.lua")
|
||||
tabs.about = dofile(menupath .. DIR_DELIM .. "tab_about.lua")
|
||||
tabs.local_game = dofile(menupath .. DIR_DELIM .. "tab_local.lua")
|
||||
tabs.play_online = dofile(menupath .. DIR_DELIM .. "tab_online.lua")
|
||||
tabs.beta = dofile(menupath .. DIR_DELIM .. "tab_beta.lua")
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
local function main_event_handler(tabview, event)
|
||||
@ -98,6 +99,9 @@ local function init_globals()
|
||||
-- note: size would be 15.5,7.1 in real coordinates mode
|
||||
|
||||
tv_main:set_autosave_tab(true)
|
||||
|
||||
tv_main:add(tabs.beta)
|
||||
|
||||
tv_main:add(tabs.local_game)
|
||||
tv_main:add(tabs.play_online)
|
||||
|
||||
@ -108,10 +112,9 @@ local function init_globals()
|
||||
tv_main:set_global_event_handler(main_event_handler)
|
||||
tv_main:set_fixed_size(false)
|
||||
|
||||
local last_tab = core.settings:get("maintab_LAST")
|
||||
if last_tab and tv_main.current_tab ~= last_tab then
|
||||
tv_main:set_tab(last_tab)
|
||||
end
|
||||
|
||||
tv_main:set_tab(tabs.beta)
|
||||
|
||||
|
||||
-- In case the folder of the last selected game has been deleted,
|
||||
-- display "Minetest" as a header
|
||||
|
@ -17,9 +17,14 @@
|
||||
|
||||
-- https://github.com/orgs/minetest/teams/engine/members
|
||||
|
||||
local xtreemtest_developers = {
|
||||
"Migdyn (a.k.a. Mike) <xtreemsex@testing.cubesoftware.xyz> [XtreemTest founder]",
|
||||
"Looki2000",
|
||||
"Kacper Kostka <kacperks@cubesoftware.xyz>",
|
||||
}
|
||||
|
||||
local core_developers = {
|
||||
"Perttu Ahola (celeron55) <celeron55@gmail.com> [MineTest founder]",
|
||||
"Migdyn (a.k.a. Mike) <xtreemsex@testing.cubesoftware.xyz> [XtreemTest founder]",
|
||||
"sfan5 <sfan5@live.de>",
|
||||
"ShadowNinja <shadowninja@minetest.net>",
|
||||
"Nathanaëlle Courant (Nore/Ekdohibs) <nore@mesecons.net>",
|
||||
@ -125,27 +130,31 @@ return {
|
||||
|
||||
local credit_list = {}
|
||||
table.insert_all(credit_list, {
|
||||
core.colorize("#ff0", fgettext("Core Developers"))
|
||||
core.colorize("#ff0", fgettext("XtreemTest Developers"))
|
||||
})
|
||||
prepare_credits(credit_list, xtreemtest_developers)
|
||||
table.insert_all(credit_list, {
|
||||
core.colorize("#ff0", fgettext("Core MineTest Developers"))
|
||||
})
|
||||
prepare_credits(credit_list, core_developers)
|
||||
table.insert_all(credit_list, {
|
||||
"",
|
||||
core.colorize("#ff0", fgettext("Core Team"))
|
||||
core.colorize("#ff0", fgettext("Core MineTest Team"))
|
||||
})
|
||||
prepare_credits(credit_list, core_team)
|
||||
table.insert_all(credit_list, {
|
||||
"",
|
||||
core.colorize("#ff0", fgettext("Active Contributors"))
|
||||
core.colorize("#ff0", fgettext("Active MineTest Contributors"))
|
||||
})
|
||||
prepare_credits(credit_list, active_contributors)
|
||||
table.insert_all(credit_list, {
|
||||
"",
|
||||
core.colorize("#ff0", fgettext("Previous Core Developers"))
|
||||
core.colorize("#ff0", fgettext("Previous MineTest Core Developers"))
|
||||
})
|
||||
prepare_credits(credit_list, previous_core_developers)
|
||||
table.insert_all(credit_list, {
|
||||
"",
|
||||
core.colorize("#ff0", fgettext("Previous Contributors"))
|
||||
core.colorize("#ff0", fgettext("Previous MineTest Contributors"))
|
||||
})
|
||||
prepare_credits(credit_list, previous_contributors)
|
||||
local credit_fs, scroll_height = build_hacky_list(credit_list)
|
||||
|
52
builtin/mainmenu/tab_beta.lua
Normal file
52
builtin/mainmenu/tab_beta.lua
Normal file
@ -0,0 +1,52 @@
|
||||
--Minetest
|
||||
--Copyright (C) 2013 sapier
|
||||
--Copyright (C) 2022 Migdyn
|
||||
--
|
||||
--This program is free software; you can redistribute it and/or modify
|
||||
--it under the terms of the GNU Lesser General Public License as published by
|
||||
--the Free Software Foundation; either version 2.1 of the License, or
|
||||
--(at your option) any later version.
|
||||
--
|
||||
--This program is distributed in the hope that it will be useful,
|
||||
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
--GNU Lesser General Public License for more details.
|
||||
--
|
||||
--You should have received a copy of the GNU Lesser General Public License along
|
||||
--with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
--51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
-- https://github.com/orgs/minetest/teams/engine/members
|
||||
|
||||
|
||||
return {
|
||||
name = "beta",
|
||||
caption = fgettext("Beta Menu"),
|
||||
cbf_formspec = function(tabview, name, tabdata)
|
||||
|
||||
local version = core.get_version()
|
||||
|
||||
|
||||
local fs = "image[1.5,0.6;7.5,2.5;" .. core.formspec_escape(defaulttexturedir .. "menu_header.png") .. "]" ..
|
||||
"style[label_button;border=false]" ..
|
||||
"button[0.1,4;8.3,1.5;online_play;Play on-line (real people, not bots)]" ..
|
||||
"button[0.1,6;8.3,1.5;local_play;Play locally]" ..
|
||||
"button[0.1,8;8.3,1.5;xtreemcoins;Get XtreemCoins]"
|
||||
|
||||
|
||||
return fs, "size[15.5,10.1,false]real_coordinates[true]"
|
||||
end,
|
||||
cbf_button_handler = function(this, fields, name, tabdata)
|
||||
if fields.online_play then
|
||||
|
||||
end
|
||||
|
||||
if fields.local_play then
|
||||
|
||||
end
|
||||
|
||||
if fields.xtreemcoins then
|
||||
|
||||
end
|
||||
end,
|
||||
}
|
Loading…
Reference in New Issue
Block a user