mirror of
https://github.com/keharriso/love-nuklear.git
synced 2025-09-10 16:17:47 -04:00
Add template layout and allow manual edit focus/unfocus
This commit is contained in:
parent
752eacec7c
commit
bb3ffeb957
3 changed files with 90 additions and 0 deletions
19
example/template.lua
Normal file
19
example/template.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
-- Show off the template row layout
|
||||
|
||||
return function(ui)
|
||||
if ui:windowBegin('Template Layout', 200, 100, 300, 200,
|
||||
'title', 'border', 'movable', 'scalable') then
|
||||
x, y, width, height = ui:windowGetContentRegion()
|
||||
ui:layoutRow('dynamic', 40, 1)
|
||||
ui:label('Scale me!');
|
||||
ui:layoutTemplateBegin(height - 40)
|
||||
ui:layoutTemplatePush('static', 75)
|
||||
ui:layoutTemplatePush('dynamic')
|
||||
ui:layoutTemplatePush('variable', 75)
|
||||
ui:layoutTemplateEnd()
|
||||
ui:button(nil, '#ff0000')
|
||||
ui:button(nil, '#00ff00')
|
||||
ui:button(nil, '#0000ff')
|
||||
end
|
||||
ui:windowEnd()
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue