show current pane number
This commit is contained in:
parent
b0670b84ff
commit
e5e6193184
|
@ -1,8 +1,12 @@
|
|||
draw_menu = function()
|
||||
App.color(Menu_background)
|
||||
love.graphics.rectangle('fill', 0,0, App.screen.width, Menu_bottom)
|
||||
App.color(Normal_color)
|
||||
local x = Menu_left+5
|
||||
love.graphics.print(Current_pane_index, x, Menu_top+5)
|
||||
x = x + App.width(tostring(Current_pane_index)) + 5
|
||||
-- main buttons
|
||||
run_button()
|
||||
x = run_button(x)
|
||||
-- settings button on right
|
||||
local w = App.width('settings')
|
||||
button(Global_state, 'settings', {x=Safe_width-w-10-5, y=Menu_top+5, w=w+10, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
run_button = function()
|
||||
button(Global_state, 'run', {x=Menu_left+5, y=Menu_top+5, w=App.width('Run')+10, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
|
||||
run_button = function(x)
|
||||
local w = App.width('Run')+10
|
||||
button(Global_state, 'run', {x=x, y=Menu_top+5, w=w, h=Line_height, bg={r=0.6, g=0.8, b=0.6},
|
||||
icon = function(p)
|
||||
App.color(Normal_color)
|
||||
love.graphics.rectangle('line', p.x,p.y, p.w,p.h, 2,2)
|
||||
|
@ -34,4 +35,5 @@ run_button = function()
|
|||
love.graphics.setCanvas()
|
||||
end,
|
||||
})
|
||||
return x+w
|
||||
end
|
Loading…
Reference in New Issue