ExperimentalGear/scripts/multi/roomList/getpanel.lua

65 lines
2.2 KiB
Lua
Raw Normal View History

2022-06-05 03:12:34 +02:00
local Dim = require("common.dimensions")
local desw,desh = Dim.design.width,Dim.design.height
2022-06-24 22:09:19 +02:00
lobbypanelY = 376;
2022-06-24 22:09:19 +02:00
local l_color = gfx.CreateSkinImage("multi/roomselect/lobby_select_color.png", 1);
local l_load = gfx.CreateSkinImage("multi/roomselect/lobby_not_loaded.png",1)
local n_play_dot = gfx.CreateSkinImage("multi/roomselect/nautica/nautica_pl_dot.png",1);
2022-06-05 03:12:34 +02:00
local getpanel = function()
if screenState == "roomList" then --multi
2022-06-05 03:12:34 +02:00
local jw,jh = gfx.ImageSize(l_color);
2022-06-05 03:12:34 +02:00
gfx.BeginPath();
2022-06-24 22:09:19 +02:00
gfx.ImageRect(desw/desw, lobbypanelY, jw, jh, l_color,1,0);
2022-06-05 03:12:34 +02:00
if not loading then
2022-06-05 18:33:12 +02:00
gfx.BeginPath()
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER, gfx.TEXT_ALIGN_BOTTOM)
custom_button("Create new room",40+(desw/2), 530+(desh/2),l_load,"Digital-Serial-Bold.ttf",70,new_room)
end
end
if screenState ~= "roomList" then --nautica
2022-06-05 18:33:12 +02:00
local jw,jh = gfx.ImageSize(l_color);
2022-06-05 18:33:12 +02:00
gfx.BeginPath();
gfx.ImageRect(lobbypanelX,lobbypanelY, jw, jh, l_color,1,0);
2022-06-05 18:33:12 +02:00
gfx.BeginPath()
local jw,jh = gfx.ImageSize(l_load);
2022-06-05 18:33:12 +02:00
gfx.BeginPath();
gfx.ImageRect(40+(desw/2), 530+(desh/2), jw, jh, l_load,1,0);
local jw,jh = gfx.ImageSize(n_play_dot);
for i = 1, 3, 1 do
gfx.TextAlign(gfx.TEXT_ALIGN_RIGHT + gfx.TEXT_ALIGN_MIDDLE)
gfx.BeginPath()
gfx.FontSize(26)
if i == 1 then
gfx.SetImageTint(255,9,253)
gfx.ImageRect(desw-50, 680+(desh/2)-(40*i), jw, jh, n_play_dot,1,0);
gfx.Text(string.upper("Not Downloaded"),desw-50, 14+680+desh/2-(40*i))
elseif i == 2 then
gfx.SetImageTint(240,246,0)
gfx.ImageRect(desw-50, 680+(desh/2)-(40*i), jw, jh, n_play_dot,1,0);
gfx.Text(string.upper("Downloaded"),desw-50, 14+680+desh/2-(40*i))
elseif i == 3 then
gfx.SetImageTint(0,246,2)
gfx.ImageRect(desw-50, 680+(desh/2)-(40*i), jw, jh, n_play_dot,1,0);
gfx.Text(string.upper("Preview Playing"),desw-50, 14+680+desh/2-(40*i))
end
gfx.SetImageTint(255,255,255)
end
2022-06-05 03:12:34 +02:00
end
end
return getpanel