nautica wtf
|
@ -1,3 +1,4 @@
|
|||
_asset
|
||||
song-assets
|
||||
skin-assets
|
||||
nautica.json
|
|
@ -695,47 +695,52 @@ end
|
|||
-- -------------------------------------------------------------------------- --
|
||||
-- draw_gauge: --
|
||||
local gaugeNumBack = gfx.CreateSkinImage("gauge_num_back.png", 0)
|
||||
local gaugeBgImage = gfx.CreateSkinImage("gameplay/gauges/hard/gauge_back.png", 0)
|
||||
local gaugeFillImage = gfx.CreateSkinImage("gameplay/gauges/hard/gauge_fill.png", 0)
|
||||
|
||||
|
||||
local gaugeEffBgImage = gfx.CreateSkinImage("gameplay/gauges/effective/gauge_back.png", 0)
|
||||
local gaugeEffFailFillImage = gfx.CreateSkinImage("gameplay/gauges/effective/gauge_fill_fail.png", 0)
|
||||
local gaugeEffPassFillImage = gfx.CreateSkinImage("gameplay/gauges/effective/gauge_fill_pass.png", 0)
|
||||
|
||||
local gaugeExcBgImage = gfx.CreateSkinImage("gameplay/gauges/excessive/gauge_back.png", 0)
|
||||
local gaugeExcFillImage = gfx.CreateSkinImage("gameplay/gauges/excessive/gauge_fill.png", 0)
|
||||
|
||||
local gaugeExcArsBgImage = gfx.CreateSkinImage("gameplay/gauges/excessive_ars/gauge_back.png", 0)
|
||||
local gaugeExcArsFillImage = gfx.CreateSkinImage("gameplay/gauges/excessive_ars/gauge_fill.png", 0)
|
||||
|
||||
|
||||
function draw_gauge(deltaTime)
|
||||
|
||||
local width = 82 * scale / 1
|
||||
local height = 702 * scale / 1
|
||||
local posx = resx - width
|
||||
local posy = resy / 2 - height / 2 + 60
|
||||
if portrait then
|
||||
posx = resx - width
|
||||
posy = posy - 90
|
||||
-- fallbacks in case of unsupported type
|
||||
local gaugeBgImage = gaugeEffBgImage;
|
||||
local gaugeFillImage = gaugeEffPassFillImage;
|
||||
|
||||
if gameplay.gauge.type == 0 then
|
||||
gaugeBgImage = gaugeEffBgImage;
|
||||
|
||||
if gameplay.gauge.value <= 0.7 then
|
||||
gaugeFillImage = gaugeEffFailFillImage;
|
||||
else
|
||||
gaugeFillImage = gaugeEffPassFillImage;
|
||||
end
|
||||
|
||||
elseif gameplay.gauge.type == 1 then
|
||||
gaugeBgImage = gaugeExcBgImage;
|
||||
gaugeFillImage = gaugeExcFillImage;
|
||||
end
|
||||
|
||||
local tw, th = gfx.ImageSize(gaugeBgImage)
|
||||
gfx.ImageRect(posx, posy, tw, th, gaugeBgImage, 1, 0)
|
||||
gfx.ImageRect(posx+22, posy+11+(629-(629*(gameplay.gauge.value))), 23, 629*(gameplay.gauge.value), gaugeFillImage, 1, 0)
|
||||
|
||||
local BgW, BgH = gfx.ImageSize(gaugeBgImage);
|
||||
local FillW, FillH = gfx.ImageSize(gaugeFillImage);
|
||||
local gaugePosX = 1080 - BgW - 48;
|
||||
local gaugePosY = 1920/2 - BgH/2 - 32;
|
||||
|
||||
-- gfx.Text('RESX: ' .. resx .. ' // RESY: ' .. resy .. ' // GPX: ' .. gaugePosX, 255,1200);
|
||||
|
||||
gfx.ImageRect(gaugePosX, gaugePosY, BgW, BgH, gaugeBgImage, 1, 0)
|
||||
gfx.ImageRect(gaugePosX+22, gaugePosY+11+(FillH-(FillH*(gameplay.gauge.value))), FillW, FillH*(gameplay.gauge.value), gaugeFillImage, 1, 0)
|
||||
|
||||
|
||||
|
||||
--draw gauge % label
|
||||
posx = posx / scale
|
||||
posx = posx + (-20 * 0.5)
|
||||
-- 630 = 0% position
|
||||
height = 960 * 0.5
|
||||
posy = posy / scale
|
||||
|
||||
tw, th = gfx.ImageSize(gaugeNumBack)
|
||||
-- 80 = 100% position
|
||||
posy = posy + (95 * 0.5) + height - height * gameplay.gauge.value
|
||||
-- Draw the background
|
||||
gfx.BeginPath()
|
||||
gfx.FillColor(255, 255, 255)
|
||||
gfx.ImageRect(posx - 44, posy - 10, tw, th, gaugeNumBack, 1, 0)
|
||||
|
||||
gfx.BeginPath()
|
||||
-- gfx.FillColor(250, 228, 112)
|
||||
draw_number(posx - 24, posy + 4, 1.0, math.floor(gameplay.gauge.value * 100), 3, numberImages, true)
|
||||
-- gfx.TextAlign(gfx.TEXT_ALIGN_RIGHT + gfx.TEXT_ALIGN_MIDDLE)
|
||||
-- gfx.FontSize(18)
|
||||
-- gfx.Text(string.format("%d", math.floor(gameplay.gauge.value * 100)), posx, posy + 4)
|
||||
-- TODO: Draw gauge % label
|
||||
end
|
||||
-- -------------------------------------------------------------------------- --
|
||||
-- draw_combo: --
|
||||
|
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 95 B After Width: | Height: | Size: 95 B |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 95 B After Width: | Height: | Size: 95 B |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 95 B After Width: | Height: | Size: 95 B |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 7.4 KiB |