Mike's suggested button layout
* No more 'clone', now that I realize we can share definitions between panes. * New 'stop' button.
This commit is contained in:
parent
086062791f
commit
0d4500e41d
|
@ -8,6 +8,10 @@ draw_menu = function()
|
|||
x = x+5 + App.width(tostring(Current_pane_index)) + 10
|
||||
-- main buttons
|
||||
x = run_button(x)
|
||||
x = stop_button(x)
|
||||
App.color{r=0.5, g=0.5, b=0.5}
|
||||
love.graphics.print('code', x, Menu_top+5)
|
||||
x = x+App.width('code')+10
|
||||
if Show_code then
|
||||
x = hide_code_button(x)
|
||||
else
|
||||
|
@ -15,9 +19,11 @@ draw_menu = function()
|
|||
end
|
||||
x = copy_button(x)
|
||||
x = paste_button(x)
|
||||
x = new_pane_button(x)
|
||||
x = duplicate_pane_button(x)
|
||||
x = clear_pane_button(x)
|
||||
App.color{r=0.5, g=0.5, b=0.5}
|
||||
love.graphics.print('screen', x, Menu_top+5)
|
||||
x = x+App.width('screen')+10
|
||||
x = new_pane_button(x)
|
||||
x = delete_pane_button(x)
|
||||
-- settings button on right
|
||||
local w = App.width('settings')
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
run_button = function(x)
|
||||
local w = App.width('Run')+10
|
||||
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)
|
||||
love.graphics.print('Run', p.x+5,p.y+2)
|
||||
love.graphics.print('run', p.x+5,p.y+2)
|
||||
end,
|
||||
onpress1 = function()
|
||||
-- ## run: initialize
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
stop_button = function(x)
|
||||
local w = App.width('stop')+10
|
||||
button(Global_state, 'stop', {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)
|
||||
love.graphics.print('stop', p.x+5,p.y+2)
|
||||
end,
|
||||
onpress1 = clear_handlers,
|
||||
})
|
||||
return x+w+10
|
||||
end
|
Loading…
Reference in New Issue