mirror of
https://github.com/keharriso/love-nuklear.git
synced 2025-09-10 16:17:47 -04:00
Add button to transform example
This commit is contained in:
parent
2880f0532a
commit
569591e6eb
1 changed files with 4 additions and 2 deletions
|
@ -6,9 +6,11 @@ return function(ui)
|
|||
ui:rotate(t / 8)
|
||||
ui:scale(1 + math.sin(t / 4) / 2, 1 + math.cos(t / 4) / 2)
|
||||
ui:shear(math.cos(t / 8) / 4, math.sin(t / 8) / 4)
|
||||
if ui:windowBegin('Transform', 0, 0, 200, 200, 'border', 'title') then
|
||||
ui:layoutRow('dynamic', 150, 1)
|
||||
if ui:windowBegin('Transform', 0, 0, 200, 200, 'border', 'movable', 'title') then
|
||||
ui:layoutRow('dynamic', 100, 1)
|
||||
ui:label('You can apply transformations to the UI using ui:rotate, ui:scale, ui:shear, and ui:translate.', 'wrap')
|
||||
ui:layoutRow('dynamic', 30, 1)
|
||||
ui:button('Try and catch me!')
|
||||
end
|
||||
ui:windowEnd()
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue