Files
love-luigi/example/layout/main.lua
2015-12-05 15:43:40 -05:00

82 lines
4.2 KiB
Lua

return { id = 'mainWindow', type = 'panel',
{ type = 'menu', id = 'menubar', flow = 'x',
{ text = 'File',
{ 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' },
{ text = 'Copy', key = 'ctrl-x' },
{ text = 'Paste', key = 'ctrl-v' },
{ type = 'slider' },
},
{ text = 'View',
{ text = 'Theme',
{ text = 'Light', key = 'ctrl-l', id = 'themeLight', },
{ text = 'Dark', key = 'ctrl-d', id = 'themeDark' },
},
{ text = 'Style',
{ text = 'Default' },
},
},
{ text = 'Help',
{ id = 'about', text = 'About Luigi', icon = 'icon/16px/Book.png', key = 'f1', },
{ id = 'aboutDemo', text = 'About Luigi Demo', icon = 'icon/16px/Book Red.png', key = 'f2' },
{ id = 'license', text = 'License', key = 'f3' },
},
},
{ type = 'panel', id = 'toolbar', style = 'toolbar', flow = 'x',
{ type = 'button', id = 'newButton', style = 'toolButton', key = 'z',
icon = 'icon/32px/Blueprint.png',
status = 'Create a new thing' },
{ type = 'button', id = 'loadButton', style = 'toolButton',
icon = 'icon/32px/Calendar.png',
status = 'Load a thing' },
{ type = 'button', id = 'saveButton', style = 'toolButton',
icon = 'icon/32px/Harddrive.png',
status = 'Save a thing' },
},
{ flow = 'x',
{ id = 'leftSideBox', width = 200, minwidth = 64, scroll = true, type = 'panel',
{ text = 'Hi, I\'m centered middle. ', style = 'listThing',
align = 'middle center' },
{ text = 'Hi, I\'m right bottom.\nAlso two lines, woopdy woop.Hi, I\'m right bottom.\nAlso two lines, woopdy woop.Hi, I\'m right bottom.\nAlso two lines, woopdy woop.', style = 'listThing',
align = 'bottom right' },
{ text = 'Hi, I\'m centered top. ', style = 'listThing',
align = 'top center' },
{ text = 'A man, a plan, a canal: Panama!', style = 'listThing' },
},
{ type = 'sash', width = 4, },
{ type = 'panel', id = 'mainCanvas' },
{ type = 'sash', width = 4, },
{ type = 'panel', id = 'rightSideBox', width = 200, minwidth = 64,
{ type = 'panel', text = 'A slider', align = 'bottom', height = 24, padding = 4 },
{ type = 'slider', height = 32, margin = 4, id = 'slidey', value = 0 },
{ type = 'panel', text = 'A stepper', align = 'bottom', height = 24, padding = 4 },
{ type = 'stepper', height = 32, margin = 4,
{ value = 1, text = 'Thing One' },
{ value = 2, text = 'Thing Two' },
{ value = 3, text = 'Thing Three' },
},
{ type = 'panel', text = 'A progress bar', align = 'bottom', height = 24, padding = 4 },
{ type = 'progress', height = 32, margin = 4, id = 'progressBar', },
{ type = 'panel', text = 'A check box', align = 'bottom', height = 24, padding = 4 },
{ type = 'check', text = 'Check it out', height = 32, padding = 4, id = 'checkBox', },
{ type = 'panel', text = 'Some radio widgets', align = 'bottom', height = 24, padding = 4 },
{ type = 'radio', text = 'One fish', height = 32, padding = 4, },
{ type = 'radio', text = 'Two fish', height = 32, padding = 4, wrap = true },
{ type = 'radio', text = 'Red fish', height = 32, padding = 4, },
{ type = 'radio', text = 'Blue fish', height = 32, padding = 4, },
},
},
{ type = 'sash', height = 4, },
{ type = 'panel', flow = 'x', height = 48, padding = 2,
{ type = 'text', id = 'aTextField', text = 'Testing «ταБЬℓσ»: 1<2 & 4+1>3, now 20% off!' },
{ type = 'button', key='return', width = 80, id = 'aButton', text = 'Styling!',
font = 'font/DejaVuSansMono.ttf' },
},
{ type = 'status', id = 'statusbar', height = 24, padding = 4, color = { 255, 0, 0 } },
}