Skip to content

Commit

Permalink
added ProgressDial example
Browse files Browse the repository at this point in the history
  • Loading branch information
LordOfDragons committed Sep 19, 2024
1 parent 8be64cf commit af0c1a9
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 1 deletion.
Binary file not shown.
Binary file not shown.
Binary file added dstestproject/data/guithemes/test1/dial/dial.webp
Binary file not shown.
20 changes: 20 additions & 0 deletions dstestproject/data/guithemes/ui.guitheme.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,26 @@
</designer>


<!-- scrollbars -->
<designer name='ProgressDial.Dial1' type='ProgressDial'>
<canvasCreator parameter='normal.canvas' type='Image'>
<image parameter='image'>test1/dial/background.webp</image>
</canvasCreator>
<canvasCreator parameter='normal.dial' type='Image'>
<image parameter='image'>test1/dial/dial.webp</image>
</canvasCreator>
<canvasCreator parameter='normal.blend' type='Image'>
<image parameter='image'>test1/dial/blend.webp</image>
</canvasCreator>
<float parameter='blendWidth'>0</float>
<point parameter='normal.minimumSize' x='64' y='64'/>
</designer>

<designer name='ProgressDial.Dial2' extendNamed='ProgressDial.Dial1'>
<float parameter='blendWidth'>0.2</float>
</designer>


<!--
Import definitions for the canvas creator test. Importing allows to split complex
definitions over multiple files to keep things tidy.
Expand Down
11 changes: 10 additions & 1 deletion dstestproject/data/scripts/WindowScrollbars.ds
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ pin Dragengine.Gui.Borders
pin Dragengine.Gui.Layouts
pin Dragengine.Scenery
pin Dragengine.Utils
pin Dragengine.Gui
pin Dragengine.Gui.Layouts
pin Dragengine.Gui.Layouts
pin Dragengine.Gui



Expand Down Expand Up @@ -69,7 +73,7 @@ class WindowScrollbars extends Window


/** \brief Create game. */
public func new() super(0, 0, 500, 400)
public func new() super(0, 0, 500, 450)
runWhileBlockingLayout(block
setDesignerSelector("WindowPadding")
setLayout(BorderLayout.new())
Expand Down Expand Up @@ -143,6 +147,11 @@ class WindowScrollbars extends Window
textArea.setRowCount(6)
textArea.setDesignerSelector("TextArea.Yellowish")
p.addWidget(ScrollPanel.new(textArea))

p.addWidget(Panel.new(FlowLayout.new(LayoutAxis.x, 5), block Panel p2
p2.addWidget(ProgressDial.new(modelScroll, "ProgressDial.Dial1"))
p2.addWidget(ProgressDial.new(modelScroll, "ProgressDial.Dial2"))
end))
end), BorderLayout.Area.content)
end
end
Binary file added dstestproject/develop/vorlage/dial.svgz
Binary file not shown.
File renamed without changes.

0 comments on commit af0c1a9

Please sign in to comment.