+ implement effective and excessive rate gauges

This commit is contained in:
FajsiEx 2021-07-26 16:22:00 +02:00
parent 71b6e4173f
commit 5305fb3fc3
15 changed files with 31 additions and 2 deletions

View File

@ -695,8 +695,18 @@ 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)
@ -709,6 +719,25 @@ function draw_gauge(deltaTime)
posy = posy - 90
end
-- 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)

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 95 B

After

Width:  |  Height:  |  Size: 95 B

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 95 B

After

Width:  |  Height:  |  Size: 95 B

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 95 B

After

Width:  |  Height:  |  Size: 95 B

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB