diff --git a/scripts/gameplay.lua b/scripts/gameplay.lua index cb670c5..e52dd38 100644 --- a/scripts/gameplay.lua +++ b/scripts/gameplay.lua @@ -695,21 +695,25 @@ end -- -------------------------------------------------------------------------- -- -- draw_gauge: -- local gaugeNumBack = gfx.CreateSkinImage("gauge_num_back.png", 0) -gfx.SetGaugeColor(0, 47, 244, 255) --Normal gauge fail -gfx.SetGaugeColor(1, 252, 76, 171) --Normal gauge clear -gfx.SetGaugeColor(2, 255, 255, 255) --Hard gauge low (<30%) -gfx.SetGaugeColor(3, 255, 255, 255) --Hard gauge high (>30%) +local gaugeBgImage = gfx.CreateSkinImage("gameplay/gauges/hard/gauge_back.png", 0) +local gaugeFillImage = gfx.CreateSkinImage("gameplay/gauges/hard/gauge_fill.png", 0) function draw_gauge(deltaTime) - local height = 702 * scale / 1 + local width = 82 * scale / 1 - local posy = resy / 2 - height / 2 + 60 + local height = 702 * scale / 1 local posx = resx - width + local posy = resy / 2 - height / 2 + 60 if portrait then - posy = posy - 90 posx = resx - width + posy = posy - 90 end - gfx.DrawGauge(gameplay.gauge.value, posx, posy, width, height, deltaTime) + + 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) + + --draw gauge % label posx = posx / scale @@ -718,7 +722,7 @@ function draw_gauge(deltaTime) height = 960 * 0.5 posy = posy / scale - local tw, th = gfx.ImageSize(gaugeNumBack) + tw, th = gfx.ImageSize(gaugeNumBack) -- 80 = 100% position posy = posy + (95 * 0.5) + height - height * gameplay.gauge.value -- Draw the background diff --git a/textures/gauges/hard/gauge_back.png b/textures/gameplay/gauges/hard/gauge_back.png similarity index 100% rename from textures/gauges/hard/gauge_back.png rename to textures/gameplay/gauges/hard/gauge_back.png diff --git a/textures/gameplay/gauges/hard/gauge_fill.png b/textures/gameplay/gauges/hard/gauge_fill.png new file mode 100644 index 0000000..8af1e28 Binary files /dev/null and b/textures/gameplay/gauges/hard/gauge_fill.png differ diff --git a/textures/gauges/hard/gauge_front.png b/textures/gameplay/gauges/hard/gauge_front.png similarity index 100% rename from textures/gauges/hard/gauge_front.png rename to textures/gameplay/gauges/hard/gauge_front.png diff --git a/textures/gauges/hard/gauge_mask.png b/textures/gameplay/gauges/hard/gauge_mask.png similarity index 100% rename from textures/gauges/hard/gauge_mask.png rename to textures/gameplay/gauges/hard/gauge_mask.png diff --git a/textures/gauges/normal/gauge_back.png b/textures/gameplay/gauges/normal/gauge_back.png similarity index 100% rename from textures/gauges/normal/gauge_back.png rename to textures/gameplay/gauges/normal/gauge_back.png diff --git a/textures/gameplay/gauges/normal/gauge_fill.png b/textures/gameplay/gauges/normal/gauge_fill.png new file mode 100644 index 0000000..470f185 Binary files /dev/null and b/textures/gameplay/gauges/normal/gauge_fill.png differ diff --git a/textures/gauges/normal/gauge_front.png b/textures/gameplay/gauges/normal/gauge_front.png similarity index 100% rename from textures/gauges/normal/gauge_front.png rename to textures/gameplay/gauges/normal/gauge_front.png diff --git a/textures/gauges/normal/gauge_mask.png b/textures/gameplay/gauges/normal/gauge_mask.png similarity index 100% rename from textures/gauges/normal/gauge_mask.png rename to textures/gameplay/gauges/normal/gauge_mask.png diff --git a/textures/gauges/hard/gauge_fill.png b/textures/gauges/hard/gauge_fill.png deleted file mode 100644 index dadbe57..0000000 Binary files a/textures/gauges/hard/gauge_fill.png and /dev/null differ diff --git a/textures/gauges/normal/gauge_fill.png b/textures/gauges/normal/gauge_fill.png deleted file mode 100644 index d860f90..0000000 Binary files a/textures/gauges/normal/gauge_fill.png and /dev/null differ