result = dan / partly multi / clear rate
This commit is contained in:
parent
08cf0a530b
commit
40a0e852d4
|
@ -1,6 +1,13 @@
|
|||
json = require "json"
|
||||
|
||||
local common = require('common.common');
|
||||
local Background = require('components.background');
|
||||
local difbar = require("components.diff_rectangle");
|
||||
|
||||
local bar = gfx.CreateSkinImage("song_select/textboard.png", 1);
|
||||
local M_jacket = gfx.CreateSkinImage("result/panels/multi_jacket.png", 1);
|
||||
|
||||
local tempbg = gfx.CreateSkinImage("result/panels/multi_lobby.png", 1);
|
||||
|
||||
local resX,resY = game.GetResolution()
|
||||
|
||||
|
@ -145,8 +152,6 @@ draw_button_color = function(name, x, y, buttonWidth, hoverindex,r,g,b, olr,olg,
|
|||
end;
|
||||
|
||||
draw_checkbox = function(text, x, y, hoverindex, current, can_click)
|
||||
local rx = x - (buttonWidth / 2);
|
||||
local ty = y - (buttonHeight / 2);
|
||||
gfx.BeginPath();
|
||||
|
||||
if can_click then
|
||||
|
@ -156,6 +161,7 @@ draw_checkbox = function(text, x, y, hoverindex, current, can_click)
|
|||
end
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_MIDDLE);
|
||||
gfx.FontSize(35);
|
||||
gfx.FillColor(201,0,0);
|
||||
gfx.Text(text, x, y)
|
||||
|
||||
local xmin,ymin,xmax,ymax = gfx.TextBounds(x, y, text);
|
||||
|
@ -163,50 +169,38 @@ draw_checkbox = function(text, x, y, hoverindex, current, can_click)
|
|||
local sx = xmin - 40;
|
||||
local sy = y - 15;
|
||||
|
||||
gfx.StrokeColor(0,128,255);
|
||||
if can_click and (mouse_clipped(sx, sy, 31, 30) or mouse_clipped(xmin-10, ymin, xmax-xmin, ymax-ymin)) then
|
||||
if can_click and mouse_clipped(xmin-10, ymin, xmax-xmin, ymax-ymin) then
|
||||
hovered = hoverindex;
|
||||
gfx.StrokeColor(255,128,0);
|
||||
end
|
||||
|
||||
gfx.Rect(sx, y - 15, 30, 30)
|
||||
gfx.StrokeWidth(2)
|
||||
gfx.Stroke()
|
||||
|
||||
if current then
|
||||
-- Draw checkmark
|
||||
gfx.BeginPath();
|
||||
gfx.MoveTo(sx+5, sy+10);
|
||||
gfx.LineTo(sx+15, y+5);
|
||||
gfx.LineTo(sx+35, y-15);
|
||||
gfx.StrokeWidth(5)
|
||||
gfx.StrokeColor(0,255,0);
|
||||
gfx.Stroke()
|
||||
|
||||
gfx.FillColor(0, 236, 0);
|
||||
gfx.Text(text, x, y)
|
||||
gfx.Fill();
|
||||
end
|
||||
end;
|
||||
|
||||
local userHeight = 100
|
||||
|
||||
--look into user changing -- IMPORTANT !!!
|
||||
draw_user = function(user, x, y, buttonWidth, rank)
|
||||
local buttonHeight = userHeight;
|
||||
-- local y = 100
|
||||
local rx = x - (buttonWidth / 2);
|
||||
local ty = y - (buttonHeight / 2);
|
||||
gfx.BeginPath();
|
||||
gfx.FillColor(256,128,255);
|
||||
|
||||
gfx.Rect(rx - buttonBorder,
|
||||
ty - buttonBorder,
|
||||
buttonWidth + (buttonBorder * 2),
|
||||
buttonHeight + (buttonBorder * 2));
|
||||
gfx.Fill();
|
||||
gfx.BeginPath();
|
||||
if host == user.id then
|
||||
gfx.FillColor(80,0,0);
|
||||
local y = 100
|
||||
|
||||
else
|
||||
gfx.FillColor(0,0,40);
|
||||
end
|
||||
gfx.Rect(rx, ty, buttonWidth, buttonHeight);
|
||||
gfx.Fill();
|
||||
gfx.BeginPath();
|
||||
gfx.FillColor(255,255,255);
|
||||
|
@ -263,11 +257,10 @@ draw_user = function(user, x, y, buttonWidth, rank)
|
|||
if user.level ~= 0 then
|
||||
gfx.FillColor(255,255,0)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE);
|
||||
local level_text = 'Lvl '..user.level..' '
|
||||
local level_text = user.level
|
||||
gfx.Text(level_text, x-buttonWidth/2 + 5, second_y-5)
|
||||
local xmin,ymin,xmax,ymax = gfx.TextBounds(x-buttonWidth/2 + 5, second_y-5, level_text);
|
||||
|
||||
|
||||
if user.badge then
|
||||
gfx.BeginPath()
|
||||
local iw, ih = gfx.ImageSize(user.badge)
|
||||
|
@ -303,24 +296,13 @@ function render_info()
|
|||
gfx.Save()
|
||||
gfx.ResetTransform()
|
||||
gfx.BeginPath()
|
||||
gfx.MoveTo(0, resY)
|
||||
gfx.LineTo(550, resY)
|
||||
gfx.LineTo(500, resY - 65)
|
||||
gfx.LineTo(0, resY - 65)
|
||||
gfx.ClosePath()
|
||||
gfx.FillColor(33,33,33)
|
||||
gfx.Fill()
|
||||
gfx.FillColor(255,255,255)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT, gfx.TEXT_ALIGN_BOTTOM)
|
||||
gfx.FontSize(70)
|
||||
gfx.Text("Multiplayer", 3, resY - 15)
|
||||
local xmin,ymin,xmax,ymax = gfx.TextBounds(3, resY - 3, "Multiplayer")
|
||||
-- gfx.Text("Multiplayer", 3, resY - 15)
|
||||
-- local xmin,ymin,xmax,ymax = gfx.TextBounds(3, resY - 3, "Multiplayer")
|
||||
gfx.FontSize(20)
|
||||
gfx.Text(MULTIPLAYER_VERSION, xmax + 13, resY - 15)
|
||||
--gfx.Text('Server: '..'', xmax + 13, resY - 15)
|
||||
draw_button_color("Settings", 500-60, resY-25, 120, function()
|
||||
mpScreen.OpenSettings();
|
||||
end, 33,33,33, 33,33,33)
|
||||
gfx.FillColor(255,255,255)
|
||||
gfx.Text(MULTIPLAYER_VERSION, 1035, 1917)
|
||||
gfx.Restore()
|
||||
|
||||
if searchStatus then
|
||||
|
@ -331,58 +313,29 @@ function render_info()
|
|||
gfx.Text(searchStatus, 3, 3)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
draw_diff_icon = function(diff, x, y, w, h, selected)
|
||||
local shrinkX = w/4
|
||||
local shrinkY = h/4
|
||||
if selected then
|
||||
gfx.FontSize(h/2)
|
||||
shrinkX = w/6
|
||||
shrinkY = h/6
|
||||
else
|
||||
gfx.FontSize(math.floor(h / 3))
|
||||
end
|
||||
gfx.BeginPath()
|
||||
gfx.RoundedRectVarying(x+shrinkX,y+shrinkY,w-shrinkX*2,h-shrinkY*2,0,0,0,0)
|
||||
gfx.FillColor(15,15,15)
|
||||
gfx.StrokeColor(table.unpack(diffColors[diff.difficulty + 1]))
|
||||
gfx.StrokeWidth(2)
|
||||
gfx.Fill()
|
||||
gfx.Stroke()
|
||||
gfx.FillColor(255,255,255)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_MIDDLE + gfx.TEXT_ALIGN_CENTER)
|
||||
gfx.FastText(tostring(diff.level), x+(w/2),y+(h/2))
|
||||
|
||||
draw_diff_icon = function(diff, x, y, w, h)
|
||||
difbar.render(deltaTime, x, y, 1, diff.difficulty, diff.level);
|
||||
end
|
||||
|
||||
local doffset = 0;
|
||||
local timer = 0;
|
||||
|
||||
draw_cursor = function(x,y,rotation,width)
|
||||
gfx.Save()
|
||||
gfx.BeginPath();
|
||||
gfx.Translate(x,y)
|
||||
gfx.Rotate(rotation)
|
||||
gfx.StrokeColor(255,128,0)
|
||||
gfx.StrokeWidth(4)
|
||||
gfx.Rect(-width/2, -width/2, width, width)
|
||||
gfx.Stroke()
|
||||
gfx.Restore()
|
||||
end
|
||||
local possy = 1095;
|
||||
local possx = 150;
|
||||
|
||||
draw_diffs = function(diffs, x, y, w, h, selectedDiff)
|
||||
local diffWidth = w/2.5
|
||||
local diffHeight = w/2.5
|
||||
local diffWidth = w/2
|
||||
local diffHeight = w/2
|
||||
local diffCount = #diffs
|
||||
gfx.Scissor(x,y,w,h)
|
||||
gfx.Scissor(x+84 + possx,y + possy,w/2.451,h)
|
||||
for i = math.max(selectedDiff - 2, 1), math.max(selectedDiff - 1,1) do
|
||||
local diff = diffs[i]
|
||||
local xpos = x + ((w/2 - diffWidth/2) + (selectedDiff - i + doffset)*(-0.8*diffWidth))
|
||||
if i ~= selectedDiff then
|
||||
draw_diff_icon(diff, xpos, y, diffWidth, diffHeight, false)
|
||||
draw_diff_icon(diff, xpos + possx, y + possy, diffWidth, diffHeight, false)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -391,21 +344,14 @@ draw_diffs = function(diffs, x, y, w, h, selectedDiff)
|
|||
local diff = diffs[i]
|
||||
local xpos = x + ((w/2 - diffWidth/2) + (selectedDiff - i + doffset)*(-0.8*diffWidth))
|
||||
if i ~= selectedDiff then
|
||||
draw_diff_icon(diff, xpos, y, diffWidth, diffHeight, false)
|
||||
draw_diff_icon(diff, xpos + possx, y + possy, diffWidth, diffHeight, false)
|
||||
end
|
||||
end
|
||||
local diff = diffs[selectedDiff]
|
||||
local xpos = x + ((w/2 - diffWidth/2) + (doffset)*(-0.8*diffWidth))
|
||||
draw_diff_icon(diff, xpos, y, diffWidth, diffHeight, true)
|
||||
gfx.BeginPath()
|
||||
gfx.FillColor(0,128,255)
|
||||
gfx.Rect(x,y+10,2,diffHeight-h/6)
|
||||
gfx.Fill()
|
||||
gfx.BeginPath()
|
||||
gfx.Rect(x+w-2,y+10,2,diffHeight-h/6)
|
||||
gfx.Fill()
|
||||
draw_diff_icon(diff, xpos + possx, y + possy, diffWidth, diffHeight, true)
|
||||
gfx.ResetScissor()
|
||||
draw_cursor(x + w/2, y +diffHeight/2, timer * math.pi, diffHeight / 1.5)
|
||||
|
||||
end
|
||||
|
||||
set_diff = function(oldDiff, newDiff)
|
||||
|
@ -450,7 +396,7 @@ function draw_rooms(y, h)
|
|||
local ypos = y + (h/2) - offsetY;
|
||||
local status = room.current..'/'..room.max
|
||||
if room.ingame then
|
||||
status = status..' (In Game)'
|
||||
status = status..' (IN MATCH)'
|
||||
end
|
||||
if room.password then
|
||||
status = status..' <P>'
|
||||
|
@ -494,24 +440,33 @@ function render_lobby(deltaTime)
|
|||
-- split is how the screen is split or not
|
||||
if portrait then
|
||||
split = resX
|
||||
jacket_size = math.min(resX/3, resY/3);
|
||||
user_y_off = 375+jacket_size + 70
|
||||
jacket_size = math.min(resX/4, resY/4);
|
||||
user_y_off = 800 - 70
|
||||
song_x_off = 0;
|
||||
else
|
||||
split = resX/2
|
||||
jacket_size = math.min(resX/2, resY/2);
|
||||
user_y_off = 0
|
||||
user_y_off = 70
|
||||
song_x_off = 1/2*resX;
|
||||
end
|
||||
|
||||
gfx.BeginPath();
|
||||
local tw, th = gfx.ImageSize(tempbg)
|
||||
gfx.ImageRect(0,0,tw,th,tempbg,1,0);
|
||||
|
||||
local jw , jh = gfx.ImageSize(M_jacket);
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(335, 1277, jw, jh, M_jacket,1,0);
|
||||
|
||||
gfx.LoadSkinFont('Digital-Serial-Bold.ttf')
|
||||
gfx.FillColor(255,255,255)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER, gfx.TEXT_ALIGN_BOTTOM)
|
||||
gfx.FontSize(70)
|
||||
gfx.Text(selected_room.name, resX/2, 50)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT, gfx.TEXT_ALIGN_LEFT)
|
||||
gfx.FontSize(24)
|
||||
gfx.Text(selected_room.name, 575, 1174)
|
||||
|
||||
-- === Users ===
|
||||
-- === Users === --
|
||||
|
||||
gfx.Text("Users", split/2, user_y_off+100)
|
||||
-- gfx.Text("Users", split/2, user_y_off+100)
|
||||
|
||||
buttonY = user_y_off + 125 + userHeight/2
|
||||
for i, user in ipairs(lobby_users) do
|
||||
|
@ -530,30 +485,64 @@ function render_lobby(deltaTime)
|
|||
end
|
||||
buttonY = buttonY + userHeight
|
||||
end
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_MIDDLE);
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_LEFT);
|
||||
gfx.FillColor(255,255,255)
|
||||
|
||||
|
||||
-- === song select ===
|
||||
|
||||
gfx.FontSize(60)
|
||||
gfx.Text("Selected Song:", split/2 + song_x_off, 100)
|
||||
gfx.FontSize(40)
|
||||
-- gfx.FontSize(60)
|
||||
-- gfx.Text("Selected Song:", split/2 + song_x_off, 100)
|
||||
gfx.FontSize(32)
|
||||
if selected_song == nil then
|
||||
if host == user_id then
|
||||
gfx.Text("Select song:", split/2 + song_x_off, 175)
|
||||
gfx.Text("NO SONG", 535, 1236)
|
||||
gfx.Text("NO ARIST", 535, 1275)
|
||||
gfx.FontSize(24)
|
||||
gfx.Text("NO EFFECTOR", 744, 1378)
|
||||
gfx.Text("NO ILLUSTRATOR", 744, 1406)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_TOP)
|
||||
gfx.FontSize(22)
|
||||
gfx.Text("BPM ?",777, 1307)
|
||||
gfx.FontSize(32)
|
||||
gfx.Text("BPM ?",76, 1788)
|
||||
gfx.Text("LANE-SPEED ?",76, 1832)
|
||||
else
|
||||
if missing_song then
|
||||
gfx.Text("Missing song!!!!", split/2 + song_x_off, 175)
|
||||
gfx.Text("MISSING SONG!!!!", 535, 1235)
|
||||
gfx.Text("MISSING ARIST!!!!", 535, 1275)
|
||||
gfx.FontSize(24)
|
||||
gfx.Text("MISSING EFFECTOR!!!!", 744, 1378)
|
||||
gfx.Text("MISSING ILLUSTRATOR!!!!", 744, 1406)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_TOP)
|
||||
gfx.FontSize(22)
|
||||
gfx.Text("BPM ?",777, 1307)
|
||||
gfx.FontSize(32)
|
||||
gfx.Text("BPM ?",76, 1788)
|
||||
gfx.Text("LANE-SPEED ?",76, 1832)
|
||||
else
|
||||
gfx.Text("Host is selecting song", split/2 + song_x_off, 175)
|
||||
gfx.Text("HOST IS SELECTING SONG", 535, 1235)
|
||||
gfx.Text(" ", 535, 1275)
|
||||
gfx.FontSize(24)
|
||||
gfx.Text(" ", 744, 1378)
|
||||
gfx.Text(" ", 744, 1406)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_TOP)
|
||||
gfx.FontSize(22)
|
||||
gfx.Text("BPM ?",777, 1307)
|
||||
gfx.FontSize(32)
|
||||
gfx.Text("BPM ?",76, 1788)
|
||||
gfx.Text("LANE-SPEED ?",76, 1832)
|
||||
end
|
||||
end
|
||||
if jacket == 0 then
|
||||
jacket = placeholderJacket
|
||||
end
|
||||
else
|
||||
gfx.Text(selected_song.title, split/2 + song_x_off, 175)
|
||||
gfx.Text(selected_song.title, 535, 1236)
|
||||
gfx.Text(selected_song.artist, 535, 1275)
|
||||
gfx.FontSize(24)
|
||||
gfx.Text(selected_song.effector, 744, 1377)
|
||||
gfx.Text(selected_song.illustrator, 744, 1406)
|
||||
gfx.FontSize(32)
|
||||
draw_diffs(selected_song.all_difficulties, split/2 + song_x_off - 150, 200, 300, 100, selected_song.diff_index+1)
|
||||
|
||||
if selected_song.jacket == nil or selected_song.jacket == placeholderJacket then
|
||||
|
@ -563,70 +552,68 @@ function render_lobby(deltaTime)
|
|||
end
|
||||
gfx.Save()
|
||||
gfx.BeginPath()
|
||||
gfx.Translate(split/2 + song_x_off, 325+jacket_size/2)
|
||||
gfx.Translate(481, 1303+jacket_size/2)
|
||||
gfx.ImageRect(-jacket_size/2,-jacket_size/2,jacket_size,jacket_size,jacket,1,0)
|
||||
|
||||
if mouse_clipped(split/2 + song_x_off-jacket_size/2, 325, jacket_size,jacket_size) and host == user_id then
|
||||
if mouse_clipped(481-jacket_size/2,1423+-jacket_size/2,jacket_size,jacket_size) and host == user_id then
|
||||
hovered = function()
|
||||
missing_song = false
|
||||
mpScreen.SelectSong()
|
||||
end
|
||||
end
|
||||
gfx.Restore()
|
||||
if start_game_soon then
|
||||
draw_button("Game starting...", split/2 + song_x_off, 375+jacket_size, 600, function() end);
|
||||
else
|
||||
if host == user_id then
|
||||
if selected_song == nil or not selected_song.self_picked then
|
||||
draw_button_color("Select song", split/2 + song_x_off, 375+jacket_size, 600, function()
|
||||
missing_song = false
|
||||
mpScreen.SelectSong()
|
||||
end, 0, math.min(255, 128 + math.floor(32 * math.cos(timer * math.pi))), 0, 0,128,255);
|
||||
elseif user_ready and all_ready then
|
||||
draw_button("Start game", split/2 + song_x_off, 375+jacket_size, 600, start_game)
|
||||
elseif user_ready and not all_ready then
|
||||
draw_button("Waiting for others", split/2 + song_x_off, 375+jacket_size, 600, function()
|
||||
missing_song = false
|
||||
mpScreen.SelectSong()
|
||||
end)
|
||||
else
|
||||
draw_button("Ready", split/2 + song_x_off, 375+jacket_size, 600, ready_up);
|
||||
end
|
||||
elseif host == nil then
|
||||
draw_button("Waiting for game to end", split/2 + song_x_off, 375+jacket_size, 600, function() end);
|
||||
elseif missing_song then
|
||||
draw_button("Missing Song!", split/2 + song_x_off, 375+jacket_size, 600, function() end);
|
||||
elseif selected_song ~= nil then
|
||||
if user_ready then
|
||||
draw_button("Cancel", split/2 + song_x_off, 375+jacket_size, 600, ready_up);
|
||||
else
|
||||
draw_button("Ready", split/2 + song_x_off, 375+jacket_size, 600, ready_up);
|
||||
end
|
||||
else
|
||||
draw_button("Waiting for host", split/2 + song_x_off, 375+jacket_size, 600, function() end);
|
||||
end
|
||||
end
|
||||
|
||||
draw_checkbox("Excessive", split/2 + song_x_off - 150, 375+jacket_size + 70, toggle_hard, hard_mode, not start_game_soon)
|
||||
draw_checkbox("Mirror", split/2 + song_x_off, 375+jacket_size + 70, toggle_mirror, mirror_mode, not start_game_soon)
|
||||
local check = 770
|
||||
|
||||
draw_checkbox("Rotate Host", split/2 + song_x_off + 150 + 20, 375+jacket_size + 70, toggle_rotate, do_rotate,
|
||||
draw_checkbox("Excessive", check - 200, 1625, toggle_hard, hard_mode, not start_game_soon)
|
||||
draw_checkbox("Mirror Mode",check - 15, 1625, toggle_mirror, mirror_mode, not start_game_soon)
|
||||
draw_checkbox("Rotate Host",check + 175, 1625, toggle_rotate, do_rotate,
|
||||
(owner == user_id or host == user_id) and not start_game_soon)
|
||||
|
||||
if selected_song ~= nil then
|
||||
gfx.FillColor(255,255,255)
|
||||
gfx.FontSize(20);
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_TOP)
|
||||
gfx.FontSize(32);
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_TOP)
|
||||
|
||||
if selected_song.min_bpm ~= selected_song.max_bpm then
|
||||
gfx.Text(string.format("BPM: %.0f-%.0f, Start BPM: %.0f, Hispeed: %.0f x %.1f = %.0f",
|
||||
selected_song.min_bpm, selected_song.max_bpm, selected_song.start_bpm,
|
||||
selected_song.speed_bpm, selected_song.hispeed, selected_song.speed_bpm * selected_song.hispeed),
|
||||
split/2 + song_x_off, 375+jacket_size + 70 + 30)
|
||||
|
||||
gfx.Text("BPM",76, 1788)
|
||||
gfx.Text(string.format("%.0f - %.0f",
|
||||
selected_song.min_bpm, selected_song.max_bpm),
|
||||
76 + 75, 1788)
|
||||
|
||||
gfx.Text("LANE-SPEED",76, 1832)
|
||||
gfx.Text(string.format("%.2f = %.0f",
|
||||
selected_song.hispeed, selected_song.speed_bpm * selected_song.hispeed),
|
||||
76 + 175, 1832)
|
||||
|
||||
gfx.FontSize(22);
|
||||
gfx.Text("BPM",777, 1307)
|
||||
gfx.FontSize(26);
|
||||
gfx.Text(string.format("%.0f - %.0f",
|
||||
selected_song.min_bpm, selected_song.max_bpm),
|
||||
787 + 75, 1307)
|
||||
|
||||
else
|
||||
gfx.Text(string.format("BPM: %.0f, Hispeed: %.0f x %.1f = %.0f",
|
||||
selected_song.min_bpm,
|
||||
selected_song.speed_bpm, selected_song.hispeed, selected_song.speed_bpm * selected_song.hispeed),
|
||||
split/2 + song_x_off, 375+jacket_size + 70 + 30)
|
||||
|
||||
gfx.FontSize(32);
|
||||
gfx.Text("BPM",76, 1788)
|
||||
gfx.Text(string.format("%.0f",
|
||||
selected_song.min_bpm),
|
||||
76 + 75, 1788)
|
||||
|
||||
gfx.Text("LANE-SPEED",76, 1832)
|
||||
gfx.Text(string.format("%.2f = %.0f",
|
||||
selected_song.hispeed, selected_song.speed_bpm * selected_song.hispeed),
|
||||
76 + 175, 1832)
|
||||
|
||||
gfx.FontSize(22);
|
||||
gfx.Text("BPM",777, 1307)
|
||||
gfx.FontSize(26);
|
||||
gfx.Text(string.format("%.0f",
|
||||
selected_song.min_bpm),
|
||||
787 + 75, 1307)
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -699,19 +686,18 @@ function render_new_room_password(delta_time)
|
|||
gfx.Text(string.rep("*",#textInput.text), resX/2, resY/2+40)
|
||||
draw_button("Create Room", resX/2, resY*3/4, resX/2, mpScreen.NewRoomStep);
|
||||
end
|
||||
|
||||
--here
|
||||
function render_new_room_name(deltaTime)
|
||||
gfx.BeginPath();
|
||||
gfx.LoadSkinFont("segoeui.ttf")
|
||||
gfx.FillColor(255,255,255)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER, gfx.TEXT_ALIGN_BOTTOM)
|
||||
gfx.FontSize(70)
|
||||
gfx.Text("Create New Room", resX/2, resY/4)
|
||||
|
||||
gfx.FillColor(50,50,50)
|
||||
gfx.BeginPath()
|
||||
gfx.Rect(0, resY/2-10, resX, 60)
|
||||
gfx.Fill();
|
||||
|
||||
gfx.FillColor(255,255,255)
|
||||
|
||||
gfx.Text("Please enter room name:", resX/2, resY/2-40)
|
||||
gfx.Text(textInput.text, resX/2, resY/2+40)
|
||||
draw_button("Next", resX/2, resY*3/4, resX/2, mpScreen.NewRoomStep);
|
||||
|
@ -744,6 +730,9 @@ render = function(deltaTime)
|
|||
mposx,mposy = game.GetMousePos();
|
||||
portrait = resY > resX
|
||||
|
||||
Background.draw(deltaTime);
|
||||
|
||||
|
||||
common.stopMusic();
|
||||
|
||||
doffset = doffset * 0.9
|
||||
|
|
|
@ -46,7 +46,7 @@ local defaultJacketImage = gfx.CreateSkinImage("result/default_jacket.png", 0);
|
|||
local bestScoreBadgeImage = gfx.CreateSkinImage("result/best.png", 0);
|
||||
|
||||
local appealCardImage = gfx.CreateSkinImage("crew/appeal_card.png", 0);
|
||||
local danBadgeImage = gfx.CreateSkinImage("dan/inf.png", 0);
|
||||
local danBadgeImage = gfx.CreateSkinImage("dan.png", 0);
|
||||
|
||||
local badgeLines = gfx.CreateSkinImage("result/badge_lines.png", 0);
|
||||
local badgeGrade = gfx.CreateSkinImage("result/badge_gradient.png", 0);
|
||||
|
@ -267,29 +267,61 @@ local drawRightPanel = function()
|
|||
gfx.BeginPath();
|
||||
local tw, th = gfx.ImageSize(rightPanelImage);
|
||||
gfx.ImageRect(rightPanelX, rightPanelY, tw, th, rightPanelImage, 1, 0);
|
||||
--[[
|
||||
gfx.FontSize(19.5)
|
||||
if result.speedModType == 2 then
|
||||
gfx.BeginPath();
|
||||
local tw2, th2 = gfx.ImageSize(irpanelsB);
|
||||
gfx.ImageRect(1080 - 531, rightPanelY - (130+15), tw2*0.85, th2*0.8, irpanelsO, 1, 0);
|
||||
gfx.ImageRect(1080 - 531, rightPanelY - 35 - (130+15), tw2*0.85, th2*0.8, irpanelsO, 1, 0);
|
||||
-- my Score and something
|
||||
gfx.FillColor(0,0,0,255)
|
||||
gfx.Text("LABEL", 1080 - 515, rightPanelY - 130);
|
||||
gfx.FillColor(255,255,255,255)
|
||||
gfx.FillColor(0,0,0,255)
|
||||
gfx.FontSize(19)
|
||||
gfx.Text("NEW NATIONAL SCORE!", 1080 - 515, rightPanelY - 35 - 130);
|
||||
gfx.FillColor(255,255,255,255)
|
||||
gfx.FontSize(20)
|
||||
-- my score
|
||||
gfx.Text("00000000", 1080 - 485, rightPanelY - 98);
|
||||
gfx.Text("00000000", 1080 - 485, rightPanelY - 35 - 98);
|
||||
-- best score
|
||||
gfx.Text("10000000", 1080 - 325, rightPanelY - 98);
|
||||
gfx.Text("IR LABEL", 1080 - 205, rightPanelY - 98);
|
||||
gfx.Text("10000000", 1080 - 325, rightPanelY - 35 - 98);
|
||||
gfx.FontSize(19)
|
||||
gfx.Text("NEW SCORE!", 1080 - 205, rightPanelY - 35 - 98);
|
||||
-- my Score and something
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(1080 - 531, rightPanelY - (60+15), tw2*0.85, th2*0.8, irpanelsB, 1, 0);
|
||||
gfx.FillColor(0,0,0,255)
|
||||
gfx.Text("LABEL", 1080 - 515, rightPanelY - 60);
|
||||
gfx.FillColor(255,255,255,255)
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(1080 - 531, rightPanelY - 35 - (60+15), tw2*0.85, th2*0.8, irpanelsB, 1, 0);
|
||||
gfx.FillColor(0,0,0,255)
|
||||
gfx.Text("NEW LOCATION SCORE!", 1080 - 515, rightPanelY - 35 - 60);
|
||||
gfx.FillColor(255,255,255,255)
|
||||
-- my score
|
||||
gfx.Text("00000000", 1080 - 485, rightPanelY - 28);
|
||||
gfx.Text("00000000", 1080 - 485, rightPanelY - 35 - 28);
|
||||
-- best score
|
||||
gfx.Text("10000000", 1080 - 325, rightPanelY - 28);
|
||||
gfx.Text("IR LABEL", 1080 - 205, rightPanelY - 28);
|
||||
gfx.Text("10000000", 1080 - 325, rightPanelY - 35 - 28);
|
||||
gfx.Text("NEW SCORE!", 1080 - 205, rightPanelY - 35 - 28);
|
||||
else
|
||||
gfx.BeginPath();
|
||||
local tw2, th2 = gfx.ImageSize(irpanelsB);
|
||||
gfx.ImageRect(1080 - 531, rightPanelY - (130+15), tw2*0.85, th2*0.8, irpanelsO, 1, 0);
|
||||
-- my Score and something
|
||||
gfx.FillColor(0,0,0,255)
|
||||
gfx.Text("NEW NATIONAL SCORE!", 1080 - 515, rightPanelY - 130);
|
||||
gfx.FillColor(255,255,255,255)
|
||||
-- my score
|
||||
gfx.Text("00000000", 1080 - 485, rightPanelY - 98);
|
||||
-- best score
|
||||
gfx.Text("10000000", 1080 - 325, rightPanelY - 98);
|
||||
gfx.Text("NEW SCORE!", 1080 - 205, rightPanelY - 98);
|
||||
-- my Score and something
|
||||
gfx.BeginPath();
|
||||
gfx.ImageRect(1080 - 531, rightPanelY - (60+15), tw2*0.85, th2*0.8, irpanelsB, 1, 0);
|
||||
gfx.FillColor(0,0,0,255)
|
||||
gfx.Text("NEW LOCATION SCORE!", 1080 - 515, rightPanelY - 60);
|
||||
gfx.FillColor(255,255,255,255)
|
||||
-- my score
|
||||
gfx.Text("00000000", 1080 - 485, rightPanelY - 28);
|
||||
-- best score
|
||||
gfx.Text("10000000", 1080 - 325, rightPanelY - 28);
|
||||
gfx.Text("NEW SCORE!", 1080 - 205, rightPanelY - 28);
|
||||
end
|
||||
]]
|
||||
end
|
||||
|
||||
local scoreNumber = Numbers.load_number_image("score_num");
|
||||
|
@ -532,7 +564,6 @@ end
|
|||
local drawBottomPanel = function()
|
||||
gfx.BeginPath();
|
||||
local tw, th = gfx.ImageSize(bottomPanelImage);
|
||||
|
||||
gfx.ImageRect(bottomPanelX, bottomPanelY, tw, th, bottomPanelImage, 1, 0);
|
||||
end
|
||||
|
||||
|
@ -565,7 +596,9 @@ local drawBottomPanelContent = function(deltatime)
|
|||
gfx.Text(irText, bottomPanelX + 80, bottomPanelY + 461);
|
||||
|
||||
-- Draw Performance maybe
|
||||
|
||||
gfx.BeginPath();
|
||||
gfx.Rect(bottomPanelX + 580, bottomPanelY + 421, 50, 109);
|
||||
gfx.Fill();
|
||||
end
|
||||
|
||||
local drawJacketPanel = function()
|
||||
|
|
|
@ -444,6 +444,16 @@ function drawData() -- Draws the song data on the left panel
|
|||
|
||||
gfx.Restore()
|
||||
|
||||
local hiScore = diff.scores[1];
|
||||
|
||||
|
||||
gfx.LoadSkinFont('Digital-Serial-Bold.ttf')
|
||||
gfx.FontSize(21)
|
||||
gfx.TextAlign(gfx.TEXT_ALIGN_RIGHT + gfx.TEXT_ALIGN_MIDDLE)
|
||||
local gaugePct = (hiScore and hiScore.gauge*100 or nil)
|
||||
local percentText = gaugePct and string.format("%.1f", gaugePct) or " "
|
||||
gfx.Text(percentText.." %", 335, 838)
|
||||
|
||||
-- Draw BPM
|
||||
gfx.BeginPath();
|
||||
gfx.FontSize(24)
|
||||
|
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
Loading…
Reference in New Issue