* make gauge work... kind of
|
@ -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
|
||||
|
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 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: 22 KiB After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 7.4 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: 14 KiB |
Before Width: | Height: | Size: 5.3 KiB |