add status widget and attribute

This commit is contained in:
airstruck
2015-12-05 15:43:40 -05:00
parent 3daff0bcad
commit c21611748c
7 changed files with 62 additions and 55 deletions

View File

@@ -1,8 +1,10 @@
return { id = 'mainWindow', type = 'panel',
{ type = 'menu', id = 'menubar', flow = 'x',
{ text = 'File',
{ text = 'Save', id = 'menuSave', key = 'ctrl-s' },
{ text = 'Quit', id = 'menuQuit', key = 'escape' },
{ text = 'Save', id = 'menuSave', key = 'ctrl-s',
status = 'Save to disk' },
{ text = 'Quit', id = 'menuQuit', key = 'escape',
status = 'Quit the demo' },
},
{ text = 'Edit',
{ text = 'Cut', key = 'ctrl-c' },
@@ -27,11 +29,14 @@ return { id = 'mainWindow', type = 'panel',
},
{ type = 'panel', id = 'toolbar', style = 'toolbar', flow = 'x',
{ type = 'button', id = 'newButton', style = 'toolButton', key = 'z',
icon = 'icon/32px/Blueprint.png' },
icon = 'icon/32px/Blueprint.png',
status = 'Create a new thing' },
{ type = 'button', id = 'loadButton', style = 'toolButton',
icon = 'icon/32px/Calendar.png' },
icon = 'icon/32px/Calendar.png',
status = 'Load a thing' },
{ type = 'button', id = 'saveButton', style = 'toolButton',
icon = 'icon/32px/Harddrive.png' },
icon = 'icon/32px/Harddrive.png',
status = 'Save a thing' },
},
{ flow = 'x',
{ id = 'leftSideBox', width = 200, minwidth = 64, scroll = true, type = 'panel',
@@ -72,5 +77,5 @@ return { id = 'mainWindow', type = 'panel',
{ type = 'button', key='return', width = 80, id = 'aButton', text = 'Styling!',
font = 'font/DejaVuSansMono.ttf' },
},
{ type = 'panel', id = 'statusbar', height = 24, padding = 4, color = { 255, 0, 0 } },
{ type = 'status', id = 'statusbar', height = 24, padding = 4, color = { 255, 0, 0 } },
}