adjust menu renderer
This commit is contained in:
parent
c91e5f4bd1
commit
b7c3e6ee92
@ -1906,7 +1906,7 @@ end
|
||||
rearm_mode = mknew{
|
||||
sel=1,
|
||||
bfm=1,
|
||||
crt_frm = 1,
|
||||
crt_frm = 0,
|
||||
pos=-1,
|
||||
init=function(this)
|
||||
poke(0x5f5c, 255) --no btnp repeat
|
||||
@ -1921,7 +1921,7 @@ function rearm_mode:glow_box(x0, y0, x1, y1, c, cf)
|
||||
i -= 1
|
||||
rect(x0+i,y0+i,x1-i,y1-i,v)
|
||||
end
|
||||
fillp(crt[self.crt_frm&0xff])
|
||||
fillp(crt[1+(self.crt_frm&7)])
|
||||
rectfill(x0+4, y0+4, x1-4, y1-4, cf)
|
||||
fillp()
|
||||
end
|
||||
@ -1953,7 +1953,7 @@ end
|
||||
|
||||
function rearm_mode:draw_option(id)
|
||||
local rec = self.options[id]
|
||||
self:glow_box(0,0,55,100,self:frame_col(self.sel == id),1)
|
||||
self:glow_box(0,0,55,101,self:frame_col(self.sel == id),1)
|
||||
spr(rec.icon,5, 5)
|
||||
print(rec.hdr, 13, 8, 7)
|
||||
print(rec.body, 5, 15, 6)
|
||||
@ -1989,9 +1989,9 @@ function rearm_mode:draw()
|
||||
camera(frac * -128 + (1-frac) * -56, 0)
|
||||
self:draw_option(2)
|
||||
camera(0, -28 * frac)
|
||||
self:glow_box(0,101,111,127,self:frame_col(self.sel < 0),1)
|
||||
self:glow_box(0,102,111,127,self:frame_col(self.sel < 0),1)
|
||||
spr(96,15,107,4,2)
|
||||
print("full ammo\nfull shield\n+50% health",54, 106, 6)
|
||||
print("full ammo\nfull shield\n+50% health",54, 107, 6)
|
||||
end
|
||||
|
||||
function rearm_mode:update_pos()
|
||||
@ -2011,6 +2011,7 @@ function rearm_mode:update_pos()
|
||||
end
|
||||
|
||||
function rearm_mode:update()
|
||||
self.crt_frm+=0.25
|
||||
self:update_pos()
|
||||
if self.pos > 1 then
|
||||
mode = game_mode
|
||||
|
Loading…
x
Reference in New Issue
Block a user