nautica station add multi broke need fix later
|
@ -34,6 +34,23 @@ local function drawFooter()
|
|||
gfx.Text("EXPERIMENTALGEAR " .. version.MAJOR .. "." .. version.MINOR .. "." .. version.PATCH .. "", 8, 1895)
|
||||
end
|
||||
|
||||
local function drawNautica()
|
||||
gfx.BeginPath()
|
||||
gfx.FillColor(0, 0, 0, BAR_ALPHA)
|
||||
gfx.Rect(0, footerY, Dim.design.width, FOOTER_HEIGHT)
|
||||
gfx.Fill()
|
||||
|
||||
gfx.BeginPath()
|
||||
gfx.ImageRect(Dim.design.width - 275, footerY - 25, 328 * 0.85, 188 * 0.85, footerRightImage, 1, 0)
|
||||
|
||||
gfx.BeginPath()
|
||||
gfx.LoadSkinFont("Digital-Serial-Bold.ttf")
|
||||
gfx.FontSize(20)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_TOP)
|
||||
gfx.FillColor(255, 255, 255, 255)
|
||||
gfx.Text("https://ksm.dev/ ", 8, 1895)
|
||||
end
|
||||
|
||||
local function progressTransitions(deltaTime)
|
||||
entryTransitionScale = entryTransitionScale + deltaTime / 0.3
|
||||
if (entryTransitionScale > 1) then entryTransitionScale = 1 end
|
||||
|
@ -64,4 +81,26 @@ local function draw(deltaTime, params)
|
|||
gfx.Restore()
|
||||
end
|
||||
|
||||
return {set = set, draw = draw}
|
||||
local function drawNaut(deltaTime, params)
|
||||
if params and params.noEnterTransition then
|
||||
entryTransitionScale = 1
|
||||
end
|
||||
|
||||
gfx.Save()
|
||||
|
||||
gfx.ResetTransform()
|
||||
|
||||
Dim.updateResolution()
|
||||
|
||||
Dim.transformToScreenSpace()
|
||||
|
||||
gfx.LoadSkinFont("NotoSans-Regular.ttf")
|
||||
|
||||
drawNautica()
|
||||
|
||||
progressTransitions(deltaTime)
|
||||
|
||||
gfx.Restore()
|
||||
end
|
||||
|
||||
return {set = set, draw = draw, drawNaut = drawNaut}
|
||||
|
|
|
@ -2,21 +2,27 @@ json = require "common.json"
|
|||
local header = {}
|
||||
header["user-agent"] = "unnamed_sdvx_clone"
|
||||
|
||||
local Dim = require("common.dimensions")
|
||||
local Wallpaper = require("components.wallpaper")
|
||||
local Dim = require("common.dimensions");
|
||||
local Wallpaper = require("components.wallpaper");
|
||||
local Background = require('components.background');
|
||||
local getpanel = require("multi.roomList.getpanel")
|
||||
local getroom = require("multi.roomList.getroom")
|
||||
local foot = require("components.footer");
|
||||
local Easing = require("common.easing")
|
||||
local getpanel = require("multi.roomList.getpanel");
|
||||
local getroom = require("multi.roomList.getroom");
|
||||
local getgrad = require("multi.roomList.getgrad");
|
||||
local gettop = require("multi.roomList.gettop");
|
||||
|
||||
local l_grad = gfx.CreateSkinImage("multi/roomselect/lobby_select_gradiant.png", 1);
|
||||
|
||||
local curser = gfx.CreateSkinImage("multi/roomselect/room_panel_glow.png",1)
|
||||
|
||||
local jacketFallback = gfx.CreateSkinImage("song_select/loading.png", 0)
|
||||
local diffColors = {{50,50,127}, {50,127,50}, {127,50,50}, {127, 50, 127}}
|
||||
|
||||
local entryW = 770
|
||||
local entryH = 320/1.5
|
||||
local entryH = 320/2
|
||||
local resX,resY = Dim.design.width,Dim.design.height
|
||||
local xCount = math.max(1, math.floor(resX / entryW)/2)
|
||||
local yCount = math.max(1, math.floor(resY / entryH)/2)
|
||||
local yCount = math.max(1, math.floor(resY / entryH)/2.2)
|
||||
local xOffset = (resX - xCount * entryW) / 3
|
||||
local cursorPos = 0
|
||||
local cursorPosX = 0
|
||||
|
@ -28,12 +34,18 @@ local screenState = 0 --0 = normal, 1 = level, 2 = sorting
|
|||
local loading = true
|
||||
local downloaded = {}
|
||||
local songs = {}
|
||||
local filters = {}
|
||||
local selectedLevels = {}
|
||||
local soffset = 0
|
||||
local selectedSorting = "Uploaded"
|
||||
local lastPlaying = nil
|
||||
for i = 1, 20 do
|
||||
selectedLevels[i] = false
|
||||
end
|
||||
local searchText = gfx.CreateLabel("",5,0)
|
||||
local searchIndex = 1
|
||||
local searchInputActive = false
|
||||
|
||||
|
||||
local cachepath = path.Absolute("skins/" .. game.GetSkin() .. "/nautica.json")
|
||||
local levelcursor = 0
|
||||
|
@ -56,6 +68,26 @@ function drawHeader()
|
|||
gfx.ClosePath()
|
||||
|
||||
gfx.ImageRect(resX / 2 - 200, HEADER_HEIGHT / 2 - 20, 400, 40, headerMatchingImage, 1, 0)
|
||||
|
||||
end
|
||||
|
||||
local badgeLinesAnimScale = 0
|
||||
local transitionEnterScale = 0
|
||||
|
||||
local tickTransitions = function(deltaTime)
|
||||
|
||||
if transitionEnterScale < 1 then
|
||||
transitionEnterScale = transitionEnterScale + deltaTime / 0.66 -- transition should last for that time in seconds
|
||||
else
|
||||
transitionEnterScale = 1
|
||||
end
|
||||
|
||||
if badgeLinesAnimScale < 1 then
|
||||
badgeLinesAnimScale = badgeLinesAnimScale + deltaTime / 0.5 -- transition should last for that time in seconds
|
||||
else
|
||||
badgeLinesAnimScale = 0
|
||||
end
|
||||
badgeLinesAnimOffsetX = 16 * (1-badgeLinesAnimScale);
|
||||
end
|
||||
|
||||
function addsong(song)
|
||||
|
@ -112,8 +144,9 @@ function render_song(song, x,y)
|
|||
gfx.Save()
|
||||
gfx.Translate(x,y)
|
||||
if song.jacket_url ~= nil and song.jacket == jacketFallback then
|
||||
webjacket = gfx.LoadWebImageJob(song.jacket_url, jacketFallback, 250, 250)
|
||||
song.jacket = gfx.LoadWebImageJob(song.jacket_url, jacketFallback, 250, 250)
|
||||
end
|
||||
|
||||
getroom(song,x,y,downloaded)
|
||||
gfx.Restore()
|
||||
|
||||
|
@ -133,56 +166,41 @@ function render_cursor()
|
|||
gfx.BeginPath();
|
||||
gfx.SetImageTint(255,195,0) -- orange
|
||||
gfx.ImageRect(x, y,jw,jh,curser,1,0)
|
||||
|
||||
end
|
||||
|
||||
function render_loading()
|
||||
if not loading then return end
|
||||
gfx.Save()
|
||||
gfx.ResetTransform()
|
||||
gfx.BeginPath()
|
||||
gfx.MoveTo(resX, resY)
|
||||
gfx.LineTo(resX - 350, resY)
|
||||
gfx.LineTo(resX - 300, resY - 50)
|
||||
gfx.LineTo(resX, resY - 50)
|
||||
gfx.ClosePath()
|
||||
gfx.FillColor(33,33,33)
|
||||
gfx.Fill()
|
||||
gfx.FillColor(255,255,255)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_RIGHT, gfx.TEXT_ALIGN_BOTTOM)
|
||||
gfx.FontSize(70)
|
||||
gfx.Text("LOADING...", resX - 20, resY - 3)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE)
|
||||
gfx.FontSize(20)
|
||||
|
||||
gfx.Text("LOADING "..math.random(1000), resY/3+25, resX/2 + 302+20)
|
||||
gfx.Restore()
|
||||
end
|
||||
|
||||
function render_hotkeys()
|
||||
gfx.Save()
|
||||
gfx.ResetTransform()
|
||||
gfx.BeginPath()
|
||||
gfx.FillColor(0,0,0,240)
|
||||
gfx.Rect(0,resX - 50, resY, 50)
|
||||
gfx.Fill()
|
||||
gfx.FontSize(30)
|
||||
gfx.FillColor(255,255,255)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT, gfx.TEXT_ALIGN_BOTTOM)
|
||||
gfx.Text("FXR: Sorting", resY/2, resX - 10)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_RIGHT, gfx.TEXT_ALIGN_BOTTOM)
|
||||
gfx.Text("FXL: Levels", resY/2 -20, resX - 10)
|
||||
gfx.Restore()
|
||||
end
|
||||
|
||||
function render_info()
|
||||
gfx.Save()
|
||||
gfx.ResetTransform()
|
||||
gfx.FontSize(19)
|
||||
|
||||
|
||||
for i = 1, 2, 1 do
|
||||
gfx.FillColor(255,255,255)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT, gfx.TEXT_ALIGN_BOTTOM)
|
||||
gfx.FontSize(20)
|
||||
gfx.Text("https://ksm.dev/", resX+70, resX-5)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE)
|
||||
if i == 1 then
|
||||
gfx.Text("FXR: Sorting", resY/3+25, resX/2 + 302+20 +(i*20))
|
||||
elseif i == 2 then
|
||||
gfx.Text("FXL: LV", resY/3+25, resX/2 + 302+20 +(i*20))
|
||||
end
|
||||
end
|
||||
gfx.Restore()
|
||||
end
|
||||
|
||||
function render(deltaTime)
|
||||
|
||||
tickTransitions(deltaTime)
|
||||
Dim.updateResolution()
|
||||
Wallpaper.render()
|
||||
|
||||
|
@ -190,10 +208,10 @@ function render(deltaTime)
|
|||
|
||||
Background.draw(deltaTime)
|
||||
drawHeader()
|
||||
|
||||
getpanel()
|
||||
|
||||
gfx.LoadSkinFont("NotoSans-Regular.ttf");
|
||||
gfx.Scissor(resX/resX,(resX/2.5)-40 +39,resX,1020)
|
||||
gfx.LoadSkinFont("Digital-Serial-Bold.ttf");
|
||||
displayCursorPosX = displayCursorPosX - (displayCursorPosX - cursorPosX) * deltaTime * 10
|
||||
displayCursorPosY = displayCursorPosY - (displayCursorPosY - cursorPosY) * deltaTime * 10
|
||||
if displayCursorPosY - yOffset > yCount - 1 then --scrolling down
|
||||
|
@ -204,26 +222,41 @@ function render(deltaTime)
|
|||
|
||||
gfx.Translate(xOffset, 500 - yOffset * entryH)
|
||||
|
||||
|
||||
--make it later like songwheel type loading
|
||||
for i, song in ipairs(songs) do
|
||||
if math.abs(cursorPos - i) <= xCount * yCount + xCount then
|
||||
if math.abs(cursorPos - i) <= xCount * yCount*1.5 + xCount then
|
||||
i = i - 1
|
||||
local x = entryW * (i % xCount)
|
||||
local y = math.floor(i / xCount) * entryH/2
|
||||
render_song(song, x, y)
|
||||
if math.abs(#songs - i) < 4 then load_more() end
|
||||
if math.abs(#songs - i) < 1 then load_more() end
|
||||
end
|
||||
end
|
||||
|
||||
gfx.ResetScissor()
|
||||
render_cursor()
|
||||
gfx.ResetTransform()
|
||||
gfx.Translate(resX/2,0)
|
||||
getgrad()
|
||||
gettop()
|
||||
|
||||
foot.drawNaut(deltaTime)
|
||||
|
||||
if needsReload then reload_songs() end
|
||||
if screenState == 1 then render_level_filters()
|
||||
elseif screenState == 2 then render_sorting_selection()
|
||||
end
|
||||
render_hotkeys()
|
||||
|
||||
render_loading()
|
||||
render_info()
|
||||
render_hotkeys()
|
||||
|
||||
local fifthX = resX/2
|
||||
local fifthY = resY/5
|
||||
local fourthX = resX/4
|
||||
local fourthY = resY/4
|
||||
--draw text search
|
||||
soffset = soffset * 0.8
|
||||
draw_search(fifthX,50, -fifthX/3-200, fifthY/4)
|
||||
|
||||
end
|
||||
|
||||
function archive_callback(entries, id)
|
||||
|
@ -254,6 +287,20 @@ function archive_callback(entries, id)
|
|||
return res
|
||||
end
|
||||
|
||||
local char_to_hex = function(c)
|
||||
return string.format("%%%02X", string.byte(c))
|
||||
end
|
||||
|
||||
local function urlencode(url)
|
||||
if url == nil then
|
||||
return
|
||||
end
|
||||
url = url:gsub("\n", "\r\n")
|
||||
url = url:gsub("([^%w _%%%-%.~])", char_to_hex)
|
||||
url = url:gsub(" ", "+")
|
||||
return url
|
||||
end
|
||||
|
||||
function reload_songs()
|
||||
needsReload = true
|
||||
if loading then return end
|
||||
|
@ -266,10 +313,26 @@ function reload_songs()
|
|||
table.insert(levelarr, i)
|
||||
end
|
||||
end
|
||||
if filters.levels ~= nil then
|
||||
for i,value in ipairs(filters.levels) do
|
||||
useLevels = true
|
||||
table.insert(levelarr, value)
|
||||
end
|
||||
end
|
||||
nextUrl = string.format("https://ksm.dev/app/songs?sort=%s", selectedSorting:lower())
|
||||
if useLevels then
|
||||
nextUrl = nextUrl .. "&levels=" .. table.concat(levelarr, ",")
|
||||
end
|
||||
if filters.effector ~= nil then
|
||||
nextUrl = nextUrl .. "&effector=" .. urlencode(filters.effector)
|
||||
end
|
||||
if filters.uploader ~= nil then
|
||||
nextUrl = nextUrl .. "&uploader=" .. urlencode(filters.uploader)
|
||||
end
|
||||
if filters.query ~= nil then
|
||||
nextUrl = nextUrl .. "&q=" .. urlencode(filters.query)
|
||||
end
|
||||
|
||||
songs = {}
|
||||
cursorPos = 0
|
||||
cursorPosX = 0
|
||||
|
@ -279,7 +342,6 @@ function reload_songs()
|
|||
load_more()
|
||||
game.Log(nextUrl, 0)
|
||||
needsReload = false
|
||||
|
||||
end
|
||||
|
||||
function button_pressed(button)
|
||||
|
@ -300,7 +362,6 @@ function button_pressed(button)
|
|||
selectedSorting = sortingOptions[sortingcursor + 1]
|
||||
reload_songs()
|
||||
end
|
||||
|
||||
elseif button == game.BUTTON_BTA then
|
||||
if screenState == 0 then
|
||||
local song = songs[cursorPos + 1]
|
||||
|
@ -308,6 +369,7 @@ function button_pressed(button)
|
|||
dlScreen.PlayPreview(encodeURI(song.preview_url), header, song.id)
|
||||
song.status = "Playing"
|
||||
if lastPlaying ~=nil then
|
||||
song.status = "Playing"
|
||||
lastPlaying.status = nil
|
||||
end
|
||||
lastPlaying = song
|
||||
|
@ -325,6 +387,11 @@ function button_pressed(button)
|
|||
else
|
||||
screenState = 0
|
||||
end
|
||||
elseif button == game.BUTTON_BCK then
|
||||
dlcache = io.open(cachepath, "w")
|
||||
dlcache:write(json.encode(downloaded))
|
||||
dlcache:close()
|
||||
dlScreen.Exit()
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -353,29 +420,30 @@ function advance_selection(steps)
|
|||
end
|
||||
end
|
||||
|
||||
function render_level_filters()
|
||||
function render_level_filters() --this do now
|
||||
gfx.Save()
|
||||
gfx.ResetTransform()
|
||||
gfx.BeginPath()
|
||||
gfx.Rect(0,0, resX+215, resY)
|
||||
gfx.FillColor(0,0,0,200)
|
||||
gfx.Fill()
|
||||
gfx.FillColor(255,255,255)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_TOP)
|
||||
gfx.FontSize(60)
|
||||
gfx.Text("Level filters:", 10, 10)
|
||||
gfx.FontSize(20)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_MIDDLE)
|
||||
|
||||
-- 1 - 20
|
||||
for i = 1, 20 do
|
||||
x = (resY/2)
|
||||
y = (resX/2) + (i - 1) * 40
|
||||
if selectedLevels[i] then gfx.FillColor(255,255,0) else gfx.FillColor(255,255,255) end
|
||||
gfx.Text(tostring(i), x+290, y/1.4-130)
|
||||
if i == 1 then
|
||||
bruhX = x+279
|
||||
bruhY = y-295 + (levelcursor*28.5)
|
||||
end
|
||||
end
|
||||
--box
|
||||
gfx.BeginPath()
|
||||
gfx.Rect(resX, resY, 60, 44)
|
||||
gfx.StrokeColor(255,128,0)
|
||||
gfx.Rect(bruhX,bruhY, 22, 22)
|
||||
gfx.StrokeColor(0,204,255)
|
||||
gfx.StrokeWidth(2)
|
||||
gfx.Stroke()
|
||||
gfx.FontSize(40)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_MIDDLE)
|
||||
for i = 1, 20 do
|
||||
y = (resX/2) + (i - (levelcursor + 1)) * 40
|
||||
if selectedLevels[i] then gfx.FillColor(255,255,255) else gfx.FillColor(127,127,127) end
|
||||
gfx.Text(tostring(i), resX-115, y)
|
||||
end
|
||||
gfx.Restore()
|
||||
end
|
||||
|
||||
|
@ -383,7 +451,7 @@ function render_sorting_selection()
|
|||
gfx.Save()
|
||||
gfx.ResetTransform()
|
||||
gfx.BeginPath()
|
||||
gfx.Rect(0,0, resX+215, resY)
|
||||
gfx.Rect(0,0, resX, resY)
|
||||
gfx.FillColor(0,0,0,200)
|
||||
gfx.Fill()
|
||||
gfx.FillColor(255,255,255)
|
||||
|
@ -400,7 +468,34 @@ function render_sorting_selection()
|
|||
for i, opt in ipairs(sortingOptions) do
|
||||
y = (resX/2) + (i - (sortingcursor + 1)) * 40
|
||||
if selectedSorting == opt then gfx.FillColor(255,255,255) else gfx.FillColor(127,127,127) end
|
||||
gfx.Text(opt, resX-115, y)
|
||||
gfx.Text(opt, resX/2, y)
|
||||
end
|
||||
gfx.Restore()
|
||||
end
|
||||
|
||||
function update_search_text(active, text)
|
||||
searchInputActive = active
|
||||
gfx.UpdateLabel(searchText ,string.format("Search: %s",text), 30, 0)
|
||||
end
|
||||
|
||||
function update_search_filters(new_filters)
|
||||
filters = new_filters
|
||||
reload_songs()
|
||||
end
|
||||
|
||||
local searchIndex = 1
|
||||
function draw_search(x,y,w,h)
|
||||
gfx.Save()
|
||||
gfx.ResetTransform()
|
||||
soffset = soffset + (searchIndex) - (searchInputActive and 0 or 1)
|
||||
if searchIndex ~= (searchInputActive and 0 or 1) then
|
||||
game.PlaySample("woosh")
|
||||
end
|
||||
searchIndex = searchInputActive and 0 or 1
|
||||
|
||||
gfx.BeginPath()
|
||||
local xpos = x+110 + (searchIndex + soffset)*w
|
||||
gfx.BeginPath();
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE);
|
||||
gfx.DrawLabel(searchText, xpos+10,y+(h/2), w-20)
|
||||
|
||||
end
|
|
@ -178,12 +178,14 @@ local render = function (deltaTime, bpm, laneSpeed, jacketPath, diff, level, pro
|
|||
demoMode(songTitle,songArtist)
|
||||
end
|
||||
|
||||
elseif gameplay.scoreReplays and not gameplay.autoplay and not gameplay.demoMode and gameplay.practice_setup == nil then
|
||||
-- elseif gameplay.scoreReplays and not gameplay.autoplay and not gameplay.demoMode and gameplay.practice_setup == nil then
|
||||
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(0,y+310,245,67,notify,1,0);
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE)
|
||||
renderOutlinedText(30,y+354.5, "REPLAY MODE IS ENABLED", 1.5);
|
||||
-- untile its been clear how to set the flag
|
||||
|
||||
-- gfx.BeginPath();
|
||||
-- gfx.ImageRect(0,y+310,245,67,notify,1,0);
|
||||
-- gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE)
|
||||
-- renderOutlinedText(30,y+354.5, "REPLAY MODE IS ENABLED", 1.5);
|
||||
|
||||
elseif gameplay.practice_setup then
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
lobbypanelX = 0;
|
||||
lobbypanelY = (1080/2.5)-56;
|
||||
|
||||
local l_grad = gfx.CreateSkinImage("multi/roomselect/lobby_select_gradiant.png", 1);
|
||||
|
||||
local getgrad = function()
|
||||
gfx.Save()
|
||||
local jw,jh = gfx.ImageSize(l_grad);
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(lobbypanelX+116.7, lobbypanelY-160, jw/1.78, jh/1.8, l_grad,1,0);
|
||||
|
||||
gfx.Restore()
|
||||
end
|
||||
|
||||
|
||||
return getgrad
|
|
@ -1,34 +1,43 @@
|
|||
local Dim = require("common.dimensions")
|
||||
local getroom = require("multi.roomList.getroom")
|
||||
|
||||
local desw,desh = Dim.design.width,Dim.design.height
|
||||
|
||||
lobbypanelX = 0;
|
||||
lobbypanelY = (1080/2.5)-56;
|
||||
|
||||
local l_base_panel = gfx.CreateSkinImage("multi/roomselect/lobby_select.png",1);
|
||||
local l_color = gfx.CreateSkinImage("multi/roomselect/lobby_select_color.png", 1);
|
||||
local l_grad = gfx.CreateSkinImage("multi/roomselect/lobby_select_gradiant.png", 1);
|
||||
local l_load = gfx.CreateSkinImage("multi/roomselect/lobby_not_loaded.png",1)
|
||||
local l_mult = gfx.CreateSkinImage("multi/roomselect/multi_station.png",1);
|
||||
local l_naut = gfx.CreateSkinImage("multi/roomselect/nautica/nautica_station.png",1);
|
||||
local n_play_dot = gfx.CreateSkinImage("multi/roomselect/nautica/nautica_pl_dot.png",1);
|
||||
|
||||
|
||||
local station = ""
|
||||
|
||||
local getpanel = function()
|
||||
if screenState == "roomList" then
|
||||
local jw,jh = gfx.ImageSize(l_base_panel);
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(lobbypanelX, lobbypanelY, jw, jh, l_base_panel,1,0);
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(lobbypanelX, lobbypanelY, jw, jh, l_color,1,0);
|
||||
if screenState == "roomList" then --multi
|
||||
|
||||
getroom()
|
||||
station = "Multi Station"
|
||||
local jw,jh = gfx.ImageSize(l_color);
|
||||
-- gfx.BeginPath();
|
||||
-- gfx.ImageRect(lobbypanelX, lobbypanelY, jw, jh, l_base_panel,1,0);
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(lobbypanelX, lobbypanelY, jw/1.17, jh*1.18, l_color,1,0);
|
||||
|
||||
|
||||
-- gfx.BeginPath();
|
||||
-- gfx.ImageRect(lobbypanelX, lobbypanelY, jw, jh, l_grad,1,0);
|
||||
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(lobbypanelX, lobbypanelY, jw, jh, l_grad,1,0);
|
||||
gfx.FontSize(36)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER, gfx.TEXT_ALIGN_CENTER)
|
||||
gfx.LoadSkinFont("Digital-Serial-Bold.ttf");
|
||||
gfx.FillColor(243,217,175,255)
|
||||
gfx.Fill()
|
||||
gfx.Text(string.upper(station),lobbypanelX+1080/2,lobbypanelY+39)
|
||||
gfx.FillColor(255,255,255,50)
|
||||
gfx.Text(string.upper(station),lobbypanelX+1080/2,lobbypanelY+39)
|
||||
gfx.Fill()
|
||||
|
||||
|
||||
local nw,nh = gfx.ImageSize(l_mult);
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(lobbypanelX+445, lobbypanelY+9, nw, nh, l_mult,1,0);
|
||||
if not loading then
|
||||
gfx.BeginPath()
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER, gfx.TEXT_ALIGN_BOTTOM)
|
||||
|
@ -36,19 +45,40 @@ local getpanel = function()
|
|||
end
|
||||
end
|
||||
|
||||
if screenState ~= "roomList" then
|
||||
local jw,jh = gfx.ImageSize(l_base_panel);
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(lobbypanelX, lobbypanelY, jw, jh, l_base_panel,1,0);
|
||||
if screenState ~= "roomList" then --nautica
|
||||
|
||||
local jw,jh = gfx.ImageSize(l_color);
|
||||
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(lobbypanelX,lobbypanelY, jw, jh, l_color,1,0);
|
||||
|
||||
gfx.BeginPath()
|
||||
local jw,jh = gfx.ImageSize(l_load);
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(lobbypanelX, lobbypanelY, jw, jh, l_grad,1,0);
|
||||
gfx.ImageRect(40+(desw/2), 530+(desh/2), jw, jh, l_load,1,0);
|
||||
|
||||
local nw,nh = gfx.ImageSize(l_naut);
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(lobbypanelX+445, lobbypanelY+9, nw, nh, l_naut,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
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
local Dim = require("common.dimensions")
|
||||
local textscramble = require("components.textscrambler")
|
||||
local difbar = require("components.diff_rectangle")
|
||||
|
||||
local desw, desh = Dim.design.width,Dim.design.height
|
||||
|
@ -8,13 +7,15 @@ local l_panel = gfx.CreateSkinImage("multi/roomselect/room_panel.png",1);
|
|||
|
||||
local n_cost,l_pw = gfx.CreateSkinImage("multi/roomselect/pw_or_price_panel.png",1);
|
||||
|
||||
local n_panel = gfx.CreateSkinImage("multi/roomselect/nautica/nautica_panel.png",1);
|
||||
local n_panel_ja = gfx.CreateSkinImage("multi/roomselect/nautica/nautica_bg_jacket.png",1);
|
||||
local n_nodif = gfx.CreateSkinImage("multi/roomselect/nautica/no_dif.png",1);
|
||||
local n_play_dot = gfx.CreateSkinImage("multi/roomselect/nautica/nautica_pl_dot.png",1);
|
||||
|
||||
local info_panel = gfx.CreateSkinImage("multi/roomselect/room_panel_name_or_song.png",1);
|
||||
|
||||
local xnum = 190
|
||||
local ynum = 24
|
||||
|
||||
local getroom = function(song,x,y,downloaded)
|
||||
--multiplayer room list
|
||||
if screenState == "roomList" then
|
||||
|
@ -26,7 +27,6 @@ local getroom = function(song,x,y,downloaded)
|
|||
draw_rooms(desw/2, desh - 290);
|
||||
end
|
||||
|
||||
|
||||
--nautica song list
|
||||
if screenState ~= "roomList" then
|
||||
local jw,jh = gfx.ImageSize(l_panel); -- if bpm is a think change l_panel to n_panel
|
||||
|
@ -38,9 +38,7 @@ local getroom = function(song,x,y,downloaded)
|
|||
gfx.BeginPath();
|
||||
gfx.ImageRect(x+3,y+5, jw, jh, n_panel_ja,1,0);
|
||||
|
||||
if song.jacket_url ~= nil and song.jacket == jacketFallback then
|
||||
song.jacket = gfx.LoadWebImageJob(song.jacket_url, jacketFallback, 250, 250)
|
||||
end
|
||||
|
||||
gfx.BeginPath()
|
||||
gfx.ImageRect(x+3+8.9,y+5+19, jw/1.19, jh/1.3, song.jacket, 1, 0)
|
||||
|
||||
|
@ -55,14 +53,11 @@ local getroom = function(song,x,y,downloaded)
|
|||
gfx.BeginPath();
|
||||
gfx.ImageRect(x+147,y+5, jw, jh, info_panel,1,0);
|
||||
|
||||
|
||||
local xnum = 190
|
||||
local ynum = 24
|
||||
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_TOP)
|
||||
gfx.Scissor(0, 0,1080,1040)
|
||||
textscramble.textmaker(song.title,30,500,x+xnum,y+ynum,500,30,500,0,1)
|
||||
textscramble.textmaker(song.artist,30,420,x+xnum,y+ynum+40,420,30,500,0,1)
|
||||
gfx.FontSize(30)
|
||||
gfx.Text(song.title,x+xnum,y+ynum)
|
||||
gfx.Text(song.artist,x+xnum,y+ynum+40)
|
||||
|
||||
local jw,jh = gfx.ImageSize(n_play_dot);
|
||||
gfx.BeginPath();
|
||||
gfx.SetImageTint(255,9,253)
|
||||
|
@ -86,39 +81,45 @@ local getroom = function(song,x,y,downloaded)
|
|||
gfx.BeginPath();
|
||||
gfx.ImageRect(x+650,y+69, jw, jh, n_cost,1,0);
|
||||
|
||||
|
||||
local buy = "Not Downloaded"
|
||||
local buy = "AP 8000"
|
||||
|
||||
local jw,jh = gfx.ImageSize(n_play_dot);
|
||||
if song.status == "Playing" then
|
||||
gfx.BeginPath()
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_RIGHT + gfx.TEXT_ALIGN_MIDDLE)
|
||||
gfx.FontSize(24)
|
||||
gfx.SetImageTint(255,255,255)
|
||||
gfx.Text(song.status, x+878-50, y+24)
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(x+764, y+11, jw, jh, n_play_dot,1,0);
|
||||
gfx.SetImageTint(0,246,2)
|
||||
|
||||
end
|
||||
gfx.FontSize(30)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_RIGHT + gfx.TEXT_ALIGN_MIDDLE)
|
||||
if not downloaded[song.id] then
|
||||
gfx.BeginPath()
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_RIGHT + gfx.TEXT_ALIGN_MIDDLE)
|
||||
gfx.Text(buy,x+850,y+92)
|
||||
elseif downloaded[song.id] then
|
||||
buy = "Downloaded"
|
||||
gfx.Text(string.upper(buy),x+868,y+94)
|
||||
elseif downloaded[song.id] == "Downloading" then
|
||||
gfx.BeginPath()
|
||||
gfx.Text(string.upper(buy), x+868,y+94)
|
||||
elseif downloaded[song.id] == "Downloaded" then
|
||||
gfx.BeginPath()
|
||||
gfx.Text(string.upper(buy), x+868,y+94)
|
||||
end
|
||||
if song.status == "Playing" then
|
||||
gfx.BeginPath()
|
||||
gfx.FontSize(24)
|
||||
gfx.Text(string.upper(song.status), x+878-10, y+25)
|
||||
end
|
||||
if downloaded[song.id] == "Downloaded" then
|
||||
gfx.BeginPath()
|
||||
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_RIGHT + gfx.TEXT_ALIGN_MIDDLE)
|
||||
gfx.Text(buy, x+830,y+92)
|
||||
|
||||
gfx.BeginPath();
|
||||
gfx.SetImageTint(240,246,0)
|
||||
gfx.ImageRect(x+764, y+11, jw, jh, n_play_dot,1,0);
|
||||
gfx.SetImageTint(255,255,255)
|
||||
|
||||
elseif downloaded[song.id] == "Downloading" then
|
||||
gfx.BeginPath()
|
||||
gfx.SetImageTint(240,20,0)
|
||||
gfx.ImageRect(x+764, y+11, jw, jh, n_play_dot,1,0);
|
||||
gfx.SetImageTint(255,255,255)
|
||||
end
|
||||
if song.status == "Playing" then
|
||||
gfx.BeginPath();
|
||||
gfx.SetImageTint(0,246,2)
|
||||
gfx.ImageRect(x+764, y+11, jw, jh, n_play_dot,1,0);
|
||||
gfx.SetImageTint(255,255,255)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
lobbypanelX = 0;
|
||||
lobbypanelY = (1080/2.5)-56;
|
||||
|
||||
local l_base_panel = gfx.CreateSkinImage("multi/roomselect/lobby_select.png",1);
|
||||
|
||||
local gettop = function()
|
||||
|
||||
station = "Nautica Station"
|
||||
|
||||
local jw,jh = gfx.ImageSize(l_base_panel);
|
||||
gfx.BeginPath();
|
||||
gfx.SetImageTint(255,255,255,50)
|
||||
gfx.ImageRect(lobbypanelX+116.7, lobbypanelY-160, jw/1.78, jh/1.8, l_base_panel,1,0);
|
||||
gfx.BeginPath();
|
||||
gfx.FontSize(22)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER, gfx.TEXT_ALIGN_CENTER)
|
||||
gfx.LoadSkinFont("Digital-Serial-Bold.ttf");
|
||||
gfx.FillColor(243,217,175,255)
|
||||
gfx.Fill()
|
||||
gfx.Text(string.upper(station),(lobbypanelX+1080/2)-120,lobbypanelY+35-175.5)
|
||||
gfx.FillColor(255,255,255,50)
|
||||
gfx.Text(string.upper(station),(lobbypanelX+1080/2)-120,lobbypanelY+35-175.5)
|
||||
gfx.Fill()
|
||||
|
||||
end
|
||||
|
||||
return gettop
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 614 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 499 KiB |
After Width: | Height: | Size: 870 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 434 KiB |