diff --git a/docs/samples/shards/UI/Area/1.edn b/docs/samples/shards/UI/Area/1.edn deleted file mode 100644 index 5919ac59db..0000000000 --- a/docs/samples/shards/UI/Area/1.edn +++ /dev/null @@ -1,56 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (-> - (UI.Area - :Anchor Anchor.TopLeft - :Contents - (-> - "TopLeft" (UI.Label))) - (UI.Area - :Anchor Anchor.Top - :Contents - (-> - "Top" (UI.Label))) - (UI.Area - :Anchor Anchor.TopRight - :Contents - (-> - "TopRight" (UI.Label :Wrap false))) - (UI.Area - :Anchor Anchor.Left - :Contents - (-> - "Left" (UI.Label))) - (UI.Area - :Anchor Anchor.Center - :Contents - (-> - "Center" (UI.Label))) - (UI.Area - :Anchor Anchor.Right - :Contents - (-> - "Right" (UI.Label))) - (UI.Area - :Anchor Anchor.BottomLeft - :Contents - (-> - "BottomLeft" (UI.Label))) - (UI.Area - :Anchor Anchor.Bottom - :Contents - (-> - "Bottom" (UI.Label))) - (UI.Area - :Anchor Anchor.BottomRight - :Contents - (-> - "BottomRight" (UI.Label :Wrap false))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/BottomPanel/1.edn b/docs/samples/shards/UI/BottomPanel/1.edn deleted file mode 100644 index a5915eb6ae..0000000000 --- a/docs/samples/shards/UI/BottomPanel/1.edn +++ /dev/null @@ -1,15 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - - (UI - .ui-draw-queue - (UI.BottomPanel - :Contents - (-> - "Bottom Panel" (UI.Label)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/BottomPanel/1.shs b/docs/samples/shards/UI/BottomPanel/1.shs new file mode 100644 index 0000000000..9cb92f1591 --- /dev/null +++ b/docs/samples/shards/UI/BottomPanel/1.shs @@ -0,0 +1,18 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.BottomPanel( + Contents: { + "Bottom Panel" | UI.Label + } + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Button/1.edn b/docs/samples/shards/UI/Button/1.edn deleted file mode 100644 index cd384f4601..0000000000 --- a/docs/samples/shards/UI/Button/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Button - :Label "Click me!" - :Action (Msg "Clicked")))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Button/1.shs b/docs/samples/shards/UI/Button/1.shs new file mode 100644 index 0000000000..5935b47708 --- /dev/null +++ b/docs/samples/shards/UI/Button/1.shs @@ -0,0 +1,19 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Button( + Label: "Click me!" + Action: Msg("Clicked") + ) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Button/2.edn b/docs/samples/shards/UI/Button/2.edn deleted file mode 100644 index 22ba6fce55..0000000000 --- a/docs/samples/shards/UI/Button/2.edn +++ /dev/null @@ -1,15 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Button - :Label "Click me!" - :Style {:color (color 255 255 0)} - :Action (Msg "Clicked")))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Button/2.shs b/docs/samples/shards/UI/Button/2.shs new file mode 100644 index 0000000000..e1a16726ef --- /dev/null +++ b/docs/samples/shards/UI/Button/2.shs @@ -0,0 +1,22 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Button( + Label: "Click me!" + Style: { + color: @color(255 255 0) + } + Action: Msg("Clicked") + ) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/CentralPanel/1.edn b/docs/samples/shards/UI/CentralPanel/1.edn deleted file mode 100644 index 45c003461b..0000000000 --- a/docs/samples/shards/UI/CentralPanel/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - :Contents - (-> - "Central Panel" (UI.Label)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/CentralPanel/1.shs b/docs/samples/shards/UI/CentralPanel/1.shs new file mode 100644 index 0000000000..1429aaa79b --- /dev/null +++ b/docs/samples/shards/UI/CentralPanel/1.shs @@ -0,0 +1,16 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + "Central Panel" | UI.Label + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Checkbox/1.edn b/docs/samples/shards/UI/Checkbox/1.edn deleted file mode 100644 index 02bfe94b64..0000000000 --- a/docs/samples/shards/UI/Checkbox/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Checkbox - :Label "Checked" - :Variable .checked))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Checkbox/1.shs b/docs/samples/shards/UI/Checkbox/1.shs new file mode 100644 index 0000000000..4b91c84829 --- /dev/null +++ b/docs/samples/shards/UI/Checkbox/1.shs @@ -0,0 +1,19 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Checkbox( + Label: "Checked" + Variable: checked + ) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Checkbox/2.edn b/docs/samples/shards/UI/Checkbox/2.edn deleted file mode 100644 index aaa4a4880b..0000000000 --- a/docs/samples/shards/UI/Checkbox/2.edn +++ /dev/null @@ -1,15 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Checkbox - :Label "Checked" - :Style {:color (color 255 0 255) :italics true} - :Variable .checked))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Checkbox/2.shs b/docs/samples/shards/UI/Checkbox/2.shs new file mode 100644 index 0000000000..aa9f732f82 --- /dev/null +++ b/docs/samples/shards/UI/Checkbox/2.shs @@ -0,0 +1,23 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Checkbox( + Label: "Checked" + Style: { + color: @color(255 0 255) + italics: true + } + Variable: checked + ) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/CloseMenu/1.edn b/docs/samples/shards/UI/CloseMenu/1.edn deleted file mode 100644 index 9922f6e6e3..0000000000 --- a/docs/samples/shards/UI/CloseMenu/1.edn +++ /dev/null @@ -1,19 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (-> - (UI.TopPanel - :Contents - (UI.MenuBar - (-> - (UI.Menu - :Title "Menu" - :Contents - (UI.Button "Close" (UI.CloseMenu)))))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/CloseMenu/1.shs b/docs/samples/shards/UI/CloseMenu/1.shs new file mode 100644 index 0000000000..b4573f8fd4 --- /dev/null +++ b/docs/samples/shards/UI/CloseMenu/1.shs @@ -0,0 +1,20 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + { + UI.TopPanel(Contents: { + UI.MenuBar({ + UI.Menu(Title: "Menu" Contents: UI.Button("Close" UI.CloseMenu)) + }) + }) + } + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/CodeEditor/1.edn b/docs/samples/shards/UI/CodeEditor/1.edn deleted file mode 100644 index d4bce8c251..0000000000 --- a/docs/samples/shards/UI/CodeEditor/1.edn +++ /dev/null @@ -1,24 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (-> - (Setup "" >= .code) - (UI.TopPanel - :Contents - (UI.MenuBar - :Contents - (UI.Menu - "Edit" - (UI.Button - "Clear" - (-> "" > .code (UI.CloseMenu)))))) - (UI.CentralPanel - :Contents - (UI.CodeEditor .code "Rust")))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/CodeEditor/1.shs b/docs/samples/shards/UI/CodeEditor/1.shs new file mode 100644 index 0000000000..198ad9e645 --- /dev/null +++ b/docs/samples/shards/UI/CodeEditor/1.shs @@ -0,0 +1,31 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + { + Once({ + "" >= code + }) + UI.TopPanel( + Contents: { + UI.MenuBar({ + UI.Menu("Edit" UI.Button("Clear" { + "" > code + UI.CloseMenu + })) + }) + } + ) + UI.CentralPanel({ + UI.CodeEditor(code "Rust") + }) + } + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Collapsing/1.edn b/docs/samples/shards/UI/Collapsing/1.edn deleted file mode 100644 index 54dfbda8bb..0000000000 --- a/docs/samples/shards/UI/Collapsing/1.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - :Contents - (UI.Collapsing - :Heading "Heading" - :DefaultOpen true - :Contents (-> "Content" (UI.Label))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Collapsing/1.shs b/docs/samples/shards/UI/Collapsing/1.shs new file mode 100644 index 0000000000..39e37cb897 --- /dev/null +++ b/docs/samples/shards/UI/Collapsing/1.shs @@ -0,0 +1,22 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Collapsing( + Heading: "Heading" + DefaultOpen: true + Contents: { + "Content" | UI.Label + } + ) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Collapsing/2.edn b/docs/samples/shards/UI/Collapsing/2.edn deleted file mode 100644 index f58270734a..0000000000 --- a/docs/samples/shards/UI/Collapsing/2.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - :Contents - (UI.Collapsing - :Heading (UI.Button "Heading" (Msg "Clicked")) - :DefaultOpen true - :Contents (-> "Content" (UI.Label))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Collapsing/2.shs b/docs/samples/shards/UI/Collapsing/2.shs new file mode 100644 index 0000000000..a8d35d3c68 --- /dev/null +++ b/docs/samples/shards/UI/Collapsing/2.shs @@ -0,0 +1,22 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Collapsing( + Heading: UI.Button("Heading" Msg("Clicked")) + DefaultOpen: true + Contents: { + "Content" | UI.Label + } + ) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/ColorInput/1.edn b/docs/samples/shards/UI/ColorInput/1.edn deleted file mode 100644 index 2535fa6561..0000000000 --- a/docs/samples/shards/UI/ColorInput/1.edn +++ /dev/null @@ -1,12 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.ColorInput :Variable .color))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/ColorInput/1.shs b/docs/samples/shards/UI/ColorInput/1.shs new file mode 100644 index 0000000000..b008f29a16 --- /dev/null +++ b/docs/samples/shards/UI/ColorInput/1.shs @@ -0,0 +1,16 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.ColorInput(Variable: color) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Columns/1.edn b/docs/samples/shards/UI/Columns/1.edn deleted file mode 100644 index b7163a64d1..0000000000 --- a/docs/samples/shards/UI/Columns/1.edn +++ /dev/null @@ -1,17 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Columns - :Contents - [(-> - "Column 1" (UI.Label)) - (-> - "Column 2" (UI.Label))]))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Columns/1.shs b/docs/samples/shards/UI/Columns/1.shs new file mode 100644 index 0000000000..68c8776d19 --- /dev/null +++ b/docs/samples/shards/UI/Columns/1.shs @@ -0,0 +1,21 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Columns( + Contents: [ + { "Column 1" | UI.Label } + { "Column 2" | UI.Label } + ] + ) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Combo/1.edn b/docs/samples/shards/UI/Combo/1.edn deleted file mode 100644 index c6b4773f01..0000000000 --- a/docs/samples/shards/UI/Combo/1.edn +++ /dev/null @@ -1,17 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - ["α Α" "ω Ω"] - (UI.Combo - :Label "Greek letter" - :Index .index) - (ExpectString) >= .letter))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Combo/1.shs b/docs/samples/shards/UI/Combo/1.shs new file mode 100644 index 0000000000..232db7cce5 --- /dev/null +++ b/docs/samples/shards/UI/Combo/1.shs @@ -0,0 +1,17 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + ["α Α" "ω Ω"] | UI.Combo(Label: "Greek letter" Index: index) + | ExpectString >= letter + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Combo/2.edn b/docs/samples/shards/UI/Combo/2.edn deleted file mode 100644 index 8e6414a275..0000000000 --- a/docs/samples/shards/UI/Combo/2.edn +++ /dev/null @@ -1,18 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - ["α Α" "ω Ω"] - (UI.Combo - :Label "Greek letter" - :Style {:color (color 200 10 200)} - :Index .index) - (ExpectString) >= .letter))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Combo/2.shs b/docs/samples/shards/UI/Combo/2.shs new file mode 100644 index 0000000000..64eeda7850 --- /dev/null +++ b/docs/samples/shards/UI/Combo/2.shs @@ -0,0 +1,23 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + ["α Α" "ω Ω"] | + UI.Combo( + Label: "Greek letter" + Style: { + color: @color(200 10 200) + } + Index: index + ) | ExpectString >= letter + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Console/1.edn b/docs/samples/shards/UI/Console/1.edn deleted file mode 100644 index dc39309286..0000000000 --- a/docs/samples/shards/UI/Console/1.edn +++ /dev/null @@ -1,20 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (-> - (UI.CentralPanel - (-> - (UI.Button "Say Hello" (Msg "Hello!")) - (CaptureLog - :Size 24 - :MinLevel "info" - :Pattern "%^[%l]%$ [%Y-%m-%d %T.%e] %v") - (String.Join) - (UI.Console))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Console/1.shs b/docs/samples/shards/UI/Console/1.shs new file mode 100644 index 0000000000..c24148ed86 --- /dev/null +++ b/docs/samples/shards/UI/Console/1.shs @@ -0,0 +1,19 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Button("Say Hello" Msg("Hello!")) + CaptureLog(Size: 24 MinLevel: "info" Pattern: "%^[%l]%$ [%Y-%m-%d %T.%e] %v") + | String.Join + | UI.Console + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Console/2.edn b/docs/samples/shards/UI/Console/2.edn deleted file mode 100644 index d49a0ecc8c..0000000000 --- a/docs/samples/shards/UI/Console/2.edn +++ /dev/null @@ -1,36 +0,0 @@ -(defloop capture - (CaptureLog - :Size 24 - :MinLevel "info" - :Pattern "%^[%l]%$ [%Y-%m-%d %T.%e] %v" - :Suspend true) - (String.Join) > .logs - (Math.Inc .generation)) - -(Setup - "" (Set .logs :Global true) - 0 (Set .generation :Global true) - (Detach capture)) - -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (-> - (UI.BottomPanel - :Contents - (-> - (Get .generation :Global true) - (ToString) (UI.Label))) - (UI.CentralPanel - :Contents - (-> - (UI.Button "Say Hello" (Msg "Hello!")) - (Get .logs :Global true) - (UI.Console :ShowFilters true))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Console/2.shs b/docs/samples/shards/UI/Console/2.shs new file mode 100644 index 0000000000..34a30f5fd4 --- /dev/null +++ b/docs/samples/shards/UI/Console/2.shs @@ -0,0 +1,52 @@ +@wire(capture { + CaptureLog( + Size: 24 + MinLevel: "info" + Pattern: "%^[%l]%$ [%Y-%m-%d %T.%e] %v" + Suspend: true + ) + | String.Join > logs + Math.Inc(generation) + none +} Looped: true) + +Once({ + "" | Set(logs Global: true) + 0 | Set(generation Global: true) + Detach(capture) +}) + +Maybe(GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + { + UI.BottomPanel( + Contents: { + Get(generation Global: true) + | ToString | UI.Label + } + ) + UI.CentralPanel( + Contents: { + UI.Button("Say Hello" Msg("Hello!")) + Get(logs Global: true) | + UI.Console(ShowFilters: true) + } + ) + } + ) + GFX.Render(Steps: render-steps) + } +) { + ; on window close + none | Stop(capture) + none | Stop ; stop self +}) + +; Ensure output of wire is the same as input of Stop self +none \ No newline at end of file diff --git a/docs/samples/shards/UI/Disable/1.edn b/docs/samples/shards/UI/Disable/1.edn deleted file mode 100644 index b9b44f76e2..0000000000 --- a/docs/samples/shards/UI/Disable/1.edn +++ /dev/null @@ -1,15 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Disable - :Disable true - :Contents - (UI.Button "Can't be clicked")))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Disable/1.shs b/docs/samples/shards/UI/Disable/1.shs new file mode 100644 index 0000000000..7c195f7e17 --- /dev/null +++ b/docs/samples/shards/UI/Disable/1.shs @@ -0,0 +1,18 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Disable(Disable: true Contents: { + UI.Button("Can't be clicked") + }) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/DockArea/1.edn b/docs/samples/shards/UI/DockArea/1.edn deleted file mode 100644 index cbef44374d..0000000000 --- a/docs/samples/shards/UI/DockArea/1.edn +++ /dev/null @@ -1,21 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.DockArea - :Contents - (-> - (UI.Tab - :Title "Tab 1" - :Contents - (-> "Tab 1 contents" (UI.Label))) - (UI.Tab - :Title "Tab 2" - :Contents - (-> "Tab 2 contents" (UI.Label)))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/DockArea/1.shs b/docs/samples/shards/UI/DockArea/1.shs new file mode 100644 index 0000000000..36c4400f0f --- /dev/null +++ b/docs/samples/shards/UI/DockArea/1.shs @@ -0,0 +1,23 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.DockArea( + Contents: { + UI.Tab(Title: "Tab 1" Contents: { + "Tab 1 contents" | UI.Label + }) + UI.Tab(Title: "Tab 2" Contents: { + "Tab 2 contents" | UI.Label + }) + } + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Float2Input/1.edn b/docs/samples/shards/UI/Float2Input/1.edn deleted file mode 100644 index b436509337..0000000000 --- a/docs/samples/shards/UI/Float2Input/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Float2Input :Variable .float2) - (ExpectFloat2)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Float2Input/1.shs b/docs/samples/shards/UI/Float2Input/1.shs new file mode 100644 index 0000000000..9a8ccec818 --- /dev/null +++ b/docs/samples/shards/UI/Float2Input/1.shs @@ -0,0 +1,16 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Float2Input(Variable: float2) | ExpectFloat2 + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Float2Slider/1.edn b/docs/samples/shards/UI/Float2Slider/1.edn deleted file mode 100644 index c4ff6a209a..0000000000 --- a/docs/samples/shards/UI/Float2Slider/1.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Float2Slider - :Variable .float2 - :Min (float2 0) :Max (float2 1)) - (ExpectFloat2)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Float2Slider/1.shs b/docs/samples/shards/UI/Float2Slider/1.shs new file mode 100644 index 0000000000..d8d9391e30 --- /dev/null +++ b/docs/samples/shards/UI/Float2Slider/1.shs @@ -0,0 +1,20 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Float2Slider( + Variable: float2 + Min: @f2(0) + Max: @f2(1) + ) | ExpectFloat2 + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Float3Input/1.edn b/docs/samples/shards/UI/Float3Input/1.edn deleted file mode 100644 index f8db42f0da..0000000000 --- a/docs/samples/shards/UI/Float3Input/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Float3Input :Variable .float3) - (ExpectFloat3)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Float3Input/1.shs b/docs/samples/shards/UI/Float3Input/1.shs new file mode 100644 index 0000000000..007019c3b5 --- /dev/null +++ b/docs/samples/shards/UI/Float3Input/1.shs @@ -0,0 +1,16 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Float3Input(Variable: float3) | ExpectFloat3 + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Float3Slider/1.edn b/docs/samples/shards/UI/Float3Slider/1.edn deleted file mode 100644 index 7e3a9543f2..0000000000 --- a/docs/samples/shards/UI/Float3Slider/1.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Float3Slider - :Variable .float3 - :Min (float3 0) :Max (float3 1)) - (ExpectFloat3)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Float3Slider/1.shs b/docs/samples/shards/UI/Float3Slider/1.shs new file mode 100644 index 0000000000..fd664eafec --- /dev/null +++ b/docs/samples/shards/UI/Float3Slider/1.shs @@ -0,0 +1,20 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Float3Slider( + Variable: float3 + Min: @f3(0) + Max: @f3(1) + ) | ExpectFloat3 + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Float4Input/1.edn b/docs/samples/shards/UI/Float4Input/1.edn deleted file mode 100644 index 47b3d66c3d..0000000000 --- a/docs/samples/shards/UI/Float4Input/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Float4Input :Variable .float4) - (ExpectFloat4)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Float4Input/1.shs b/docs/samples/shards/UI/Float4Input/1.shs new file mode 100644 index 0000000000..4ba158ae67 --- /dev/null +++ b/docs/samples/shards/UI/Float4Input/1.shs @@ -0,0 +1,16 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Float4Input(Variable: float4) | ExpectFloat4 + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Float4Slider/1.edn b/docs/samples/shards/UI/Float4Slider/1.edn deleted file mode 100644 index 2ec0123fd7..0000000000 --- a/docs/samples/shards/UI/Float4Slider/1.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Float4Slider - :Variable .float4 - :Min (float4 0) :Max (float4 1)) - (ExpectFloat4)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Float4Slider/1.shs b/docs/samples/shards/UI/Float4Slider/1.shs new file mode 100644 index 0000000000..2f437fe147 --- /dev/null +++ b/docs/samples/shards/UI/Float4Slider/1.shs @@ -0,0 +1,20 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Float4Slider( + Variable: float4 + Min: @f4(0) + Max: @f4(1) + ) | ExpectFloat4 + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/FloatInput/1.edn b/docs/samples/shards/UI/FloatInput/1.edn deleted file mode 100644 index 8524ed864e..0000000000 --- a/docs/samples/shards/UI/FloatInput/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.FloatInput :Variable .float) - (ExpectFloat)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/FloatInput/1.shs b/docs/samples/shards/UI/FloatInput/1.shs new file mode 100644 index 0000000000..6134f3809f --- /dev/null +++ b/docs/samples/shards/UI/FloatInput/1.shs @@ -0,0 +1,16 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.FloatInput(Variable: float) | ExpectFloat + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/FloatSlider/1.edn b/docs/samples/shards/UI/FloatSlider/1.edn deleted file mode 100644 index 75b963af92..0000000000 --- a/docs/samples/shards/UI/FloatSlider/1.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.FloatSlider - :Variable .float - :Min 0.0 :Max 1.0) - (ExpectFloat)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/FloatSlider/1.shs b/docs/samples/shards/UI/FloatSlider/1.shs new file mode 100644 index 0000000000..40dd7cfc78 --- /dev/null +++ b/docs/samples/shards/UI/FloatSlider/1.shs @@ -0,0 +1,20 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.FloatSlider( + Variable: float + Min: 0.0 + Max: 1.0 + ) | ExpectFloat + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Frame/1.edn b/docs/samples/shards/UI/Frame/1.edn deleted file mode 100644 index b7315ead58..0000000000 --- a/docs/samples/shards/UI/Frame/1.edn +++ /dev/null @@ -1,18 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Frame - :InnerMargin (float4 10) :OuterMargin (float4 0) :Rounding (float4 5) - :FillColor (color 50 50 21) - :StrokeColor (color 250 250 32) :StrokeWidth (float 2) - :Contents - (-> - "Frame content" (UI.Label))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Frame/1.shs b/docs/samples/shards/UI/Frame/1.shs new file mode 100644 index 0000000000..97581baf89 --- /dev/null +++ b/docs/samples/shards/UI/Frame/1.shs @@ -0,0 +1,26 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + UI.Frame( + InnerMargin: @f4(10) + OuterMargin: @f4(0) + Rounding: @f4(5) + FillColor: @color(50 50 21) + StrokeColor: @color(250 250 32) + StrokeWidth: 2.0 + Contents: { + "Frame content" | UI.Label + } + ) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Grid/1.edn b/docs/samples/shards/UI/Grid/1.edn deleted file mode 100644 index 35937dae84..0000000000 --- a/docs/samples/shards/UI/Grid/1.edn +++ /dev/null @@ -1,26 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Grid - :Striped true - :Contents - (-> - "Col 1" (UI.Label) - "Col 2" (UI.Label) - "Col 3" (UI.Label) - (UI.NextRow) - "Hello" (UI.Label) - "shards" (UI.Label) - "!" (UI.Label) - (UI.NextRow) - "Lorem ipsum dolor sit amet" (UI.Label) - "consectetur adipiscing elit" (UI.Label) - "sed do eiusmod tempor" (UI.Label))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Grid/1.shs b/docs/samples/shards/UI/Grid/1.shs new file mode 100644 index 0000000000..846576077c --- /dev/null +++ b/docs/samples/shards/UI/Grid/1.shs @@ -0,0 +1,31 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + UI.Grid( + Striped: true + Contents: { + "Col 1" | UI.Label + "Col 2" | UI.Label + "Col 3" | UI.Label + UI.NextRow + "Hello" | UI.Label + "shards" | UI.Label + "!" | UI.Label + UI.NextRow + "Lorem ipsum dolor sit amet" | UI.Label + "consectetur adipiscing elit" | UI.Label + "sed do eiusmod tempor" | UI.Label + } + ) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Group/1.edn b/docs/samples/shards/UI/Group/1.edn deleted file mode 100644 index bafb871399..0000000000 --- a/docs/samples/shards/UI/Group/1.edn +++ /dev/null @@ -1,15 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Group - :Contents - (-> - "Group content" (UI.Label))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Group/1.shs b/docs/samples/shards/UI/Group/1.shs new file mode 100644 index 0000000000..64955b73ea --- /dev/null +++ b/docs/samples/shards/UI/Group/1.shs @@ -0,0 +1,20 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + UI.Group( + Contents: { + "Group content" | UI.Label + } + ) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/HexViewer/1.edn b/docs/samples/shards/UI/HexViewer/1.edn deleted file mode 100644 index b3b1b3bed2..0000000000 --- a/docs/samples/shards/UI/HexViewer/1.edn +++ /dev/null @@ -1,21 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (Setup - "Hello shards!" >= .text) - - (UI.Horizontal - (-> - "Text: " (UI.Label) - (UI.TextField .text))) - - .text (UI.HexViewer)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/HexViewer/1.shs b/docs/samples/shards/UI/HexViewer/1.shs new file mode 100644 index 0000000000..669c24fc70 --- /dev/null +++ b/docs/samples/shards/UI/HexViewer/1.shs @@ -0,0 +1,25 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + Once({ + "Hello shards!" >= text + }) + + UI.Horizontal({ + "text: " | UI.Label + UI.TextField(text) + }) + + text | UI.HexViewer + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Horizontal/1.edn b/docs/samples/shards/UI/Horizontal/1.edn deleted file mode 100644 index 558aac4fa3..0000000000 --- a/docs/samples/shards/UI/Horizontal/1.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Horizontal - (-> - "Hello" (UI.Label) - (UI.Separator) - "World" (UI.Label))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Horizontal/1.shs b/docs/samples/shards/UI/Horizontal/1.shs new file mode 100644 index 0000000000..ae15d6bc09 --- /dev/null +++ b/docs/samples/shards/UI/Horizontal/1.shs @@ -0,0 +1,20 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + UI.Horizontal({ + "Hello" | UI.Label + UI.Separator + "World" | UI.Label + }) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Hyperlink/1.edn b/docs/samples/shards/UI/Hyperlink/1.edn deleted file mode 100644 index 7d092ae94f..0000000000 --- a/docs/samples/shards/UI/Hyperlink/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - "https://docs.fragnova.com" - (UI.Hyperlink :Label "Fragnova documentation")))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Hyperlink/1.shs b/docs/samples/shards/UI/Hyperlink/1.shs new file mode 100644 index 0000000000..f6f69212ae --- /dev/null +++ b/docs/samples/shards/UI/Hyperlink/1.shs @@ -0,0 +1,17 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + "https://docs.fragnova.com" | + UI.Hyperlink(Label: "Fragnova Documentation") + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Hyperlink/2.edn b/docs/samples/shards/UI/Hyperlink/2.edn deleted file mode 100644 index 80342491c7..0000000000 --- a/docs/samples/shards/UI/Hyperlink/2.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - "https://docs.fragnova.com" - (UI.Hyperlink - :Label "Fragnova documentation" - :Style {:italics true})))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Hyperlink/2.shs b/docs/samples/shards/UI/Hyperlink/2.shs new file mode 100644 index 0000000000..93039d812c --- /dev/null +++ b/docs/samples/shards/UI/Hyperlink/2.shs @@ -0,0 +1,22 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + "https://docs.fragnova.com" | + UI.Hyperlink( + Label: "Fragnova Documentation" + Style: { + italics: true + } + ) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Image/1.edn b/docs/samples/shards/UI/Image/1.edn deleted file mode 100644 index dd7ccb8d7e..0000000000 --- a/docs/samples/shards/UI/Image/1.edn +++ /dev/null @@ -1,15 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (Setup - (LoadImage "data/ShardsLogo.png") = .image) - .image (UI.Image :Scale (float2 0.25))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Image/1.shs b/docs/samples/shards/UI/Image/1.shs new file mode 100644 index 0000000000..934f0e8e9c --- /dev/null +++ b/docs/samples/shards/UI/Image/1.shs @@ -0,0 +1,19 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + Once({ + LoadImage("data/ShardsLogo.png") = image + }) + image | UI.Image(Scale: @f2(0.25)) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Image/2.edn b/docs/samples/shards/UI/Image/2.edn deleted file mode 100644 index 631b50550f..0000000000 --- a/docs/samples/shards/UI/Image/2.edn +++ /dev/null @@ -1,19 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (Setup - (LoadImage "data/ShardsLogo.png") >= .image - (GFX.Texture) >= .texture) - ; Draw UI image by loading the image into graphics memory when needed - .image (UI.Image :Scale (float2 0.1)) - ; Draw UI image directly from a texture - .texture (UI.Image :Scale (float2 0.1))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Image/2.shs b/docs/samples/shards/UI/Image/2.shs new file mode 100644 index 0000000000..07c2a07dd1 --- /dev/null +++ b/docs/samples/shards/UI/Image/2.shs @@ -0,0 +1,23 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + Once({ + LoadImage("data/ShardsLogo.png") = image + | GFX.Texture >= texture + }) + ; Draw UI image by loading the image into graphics memory when needed + image | UI.Image(Scale: @f2(0.1)) + ; Draw UI image directly from a texture + texture | UI.Image(Scale: @f2(0.1)) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Image/3.edn b/docs/samples/shards/UI/Image/3.edn deleted file mode 100644 index 201ccddcbc..0000000000 --- a/docs/samples/shards/UI/Image/3.edn +++ /dev/null @@ -1,43 +0,0 @@ -;; this test script is meant to test the PremultiplyAlpha and DemultiplyAlpha shards as well as the :PremultiplyAlpha behaviour of LoadImage shrad -;; however, this script uses GFX.Texture as well. Without GFX.Texture, the issues with non-premultiplied alpha may not appear for PNGs. - -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (Setup - (LoadImage "data/Damaged_Effect_5.png" :PremultiplyAlpha true) (GFX.Texture) = .premultiplied-alpha-image-1 - (LoadImage "data/Damaged_Effect_5.png" :PremultiplyAlpha false) (PremultiplyAlpha) (GFX.Texture) = .premultiplied-alpha-image-2 - (LoadImage "data/Damaged_Effect_5.png" :PremultiplyAlpha true) (DemultiplyAlpha) (PremultiplyAlpha) (GFX.Texture) = .premultiplied-alpha-image-3 - (LoadImage "data/Damaged_Effect_5.png" :PremultiplyAlpha false) (DemultiplyAlpha) (PremultiplyAlpha) (PremultiplyAlpha) (GFX.Texture) = .premultiplied-alpha-image-4 - (LoadImage "data/Damaged_Effect_5.png" :PremultiplyAlpha false) (GFX.Texture) = .non-premultiplied-alpha-image-1 - (LoadImage "data/Damaged_Effect_5.png" :PremultiplyAlpha false) (PremultiplyAlpha) (DemultiplyAlpha) (GFX.Texture) = .non-premultiplied-alpha-image-2 - (LoadImage "data/Damaged_Effect_5.png" :PremultiplyAlpha false) (PremultiplyAlpha) (DemultiplyAlpha) (DemultiplyAlpha) (GFX.Texture) = .non-premultiplied-alpha-image-3 - (LoadImage "data/Damaged_Effect_5.png" :PremultiplyAlpha true) (PremultiplyAlpha) (DemultiplyAlpha) (GFX.Texture) = .non-premultiplied-alpha-image-4) - (UI.Horizontal - :Contents - (-> - (UI.Vertical - :Contents - (-> - .premultiplied-alpha-image-1 (UI.Image :Scale (float2 0.25)) - .premultiplied-alpha-image-2 (UI.Image :Scale (float2 0.25)) - .premultiplied-alpha-image-3 (UI.Image :Scale (float2 0.25)) - .premultiplied-alpha-image-4 (UI.Image :Scale (float2 0.25)) - )) - (UI.Vertical - :Contents - (-> - .non-premultiplied-alpha-image-1 (UI.Image :Scale (float2 0.25)) - .non-premultiplied-alpha-image-2 (UI.Image :Scale (float2 0.25)) - .non-premultiplied-alpha-image-3 (UI.Image :Scale (float2 0.25)) - .non-premultiplied-alpha-image-4 (UI.Image :Scale (float2 0.25)) - ))))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Image/3.shs b/docs/samples/shards/UI/Image/3.shs new file mode 100644 index 0000000000..aebb9b5a53 --- /dev/null +++ b/docs/samples/shards/UI/Image/3.shs @@ -0,0 +1,46 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + Once({ + LoadImage("data/Damaged_Effect_5.png" PremultiplyAlpha: true) | GFX.Texture = premultiplied-alpha-image-1 + LoadImage("data/Damaged_Effect_5.png" PremultiplyAlpha: false) | PremultiplyAlpha | GFX.Texture = premultiplied-alpha-image-2 + LoadImage("data/Damaged_Effect_5.png" PremultiplyAlpha: true) | DemultiplyAlpha | PremultiplyAlpha | GFX.Texture = premultiplied-alpha-image-3 + LoadImage("data/Damaged_Effect_5.png" PremultiplyAlpha: false) | DemultiplyAlpha | PremultiplyAlpha | PremultiplyAlpha | GFX.Texture = premultiplied-alpha-image-4 + + LoadImage("data/Damaged_Effect_5.png" PremultiplyAlpha: false) | GFX.Texture = non-premultiplied-alpha-image-1 + LoadImage("data/Damaged_Effect_5.png" PremultiplyAlpha: false) | PremultiplyAlpha | DemultiplyAlpha | GFX.Texture = non-premultiplied-alpha-image-2 + LoadImage("data/Damaged_Effect_5.png" PremultiplyAlpha: false) | PremultiplyAlpha | DemultiplyAlpha | DemultiplyAlpha | GFX.Texture = non-premultiplied-alpha-image-3 + LoadImage("data/Damaged_Effect_5.png" PremultiplyAlpha: true) | PremultiplyAlpha | DemultiplyAlpha | GFX.Texture = non-premultiplied-alpha-image-4 + }) + UI.Horizontal( + Contents: { + UI.Vertical( + Contents: { + premultiplied-alpha-image-1 | UI.Image(Scale: @f2(0.25)) + premultiplied-alpha-image-2 | UI.Image(Scale: @f2(0.25)) + premultiplied-alpha-image-3 | UI.Image(Scale: @f2(0.25)) + premultiplied-alpha-image-4 | UI.Image(Scale: @f2(0.25)) + } + ) + UI.Vertical( + Contents: { + non-premultiplied-alpha-image-1 | UI.Image(Scale: @f2(0.25)) + non-premultiplied-alpha-image-2 | UI.Image(Scale: @f2(0.25)) + non-premultiplied-alpha-image-3 | UI.Image(Scale: @f2(0.25)) + non-premultiplied-alpha-image-4 | UI.Image(Scale: @f2(0.25)) + } + ) + } + ) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/ImageButton/1.edn b/docs/samples/shards/UI/ImageButton/1.edn deleted file mode 100644 index 62f65b0459..0000000000 --- a/docs/samples/shards/UI/ImageButton/1.edn +++ /dev/null @@ -1,15 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (Setup - (LoadImage "../../assets/ShardsLogo.png") = .image) - .image (UI.ImageButton :Scale (float2 0.1) :Action (Msg "Clicked"))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/ImageButton/1.shs b/docs/samples/shards/UI/ImageButton/1.shs new file mode 100644 index 0000000000..0f7b2de8ad --- /dev/null +++ b/docs/samples/shards/UI/ImageButton/1.shs @@ -0,0 +1,21 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + Once({ + LoadImage("../../assets/ShardsLogo.png") = image + }) + image | UI.ImageButton(Scale: @f2(0.1) Action: { + Msg("Clicked") + }) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/ImageButton/2.edn b/docs/samples/shards/UI/ImageButton/2.edn deleted file mode 100644 index 78e3192e5c..0000000000 --- a/docs/samples/shards/UI/ImageButton/2.edn +++ /dev/null @@ -1,19 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (Setup - (LoadImage "data/ShardsLogo.png") >= .image - (GFX.Texture) >= .texture) - ; Draw UI image by loading the image into graphics memory when needed - .image (UI.ImageButton :Scale (float2 0.1)) - ; Draw UI image directly from a texture - .texture (UI.ImageButton :Scale (float2 0.1))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/ImageButton/2.shs b/docs/samples/shards/UI/ImageButton/2.shs new file mode 100644 index 0000000000..9434f5e48d --- /dev/null +++ b/docs/samples/shards/UI/ImageButton/2.shs @@ -0,0 +1,23 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + Once({ + LoadImage("data/ShardsLogo.png") = image + | GFX.Texture >= texture + }) + ; Draw UI image by loading the image into graphics memory when needed + image | UI.ImageButton(Scale: @f2(0.1)) + ; Draw UI image directly from a texture + texture | UI.ImageButton(Scale: @f2(0.1)) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Indent/1.edn b/docs/samples/shards/UI/Indent/1.edn deleted file mode 100644 index ffa248eae8..0000000000 --- a/docs/samples/shards/UI/Indent/1.edn +++ /dev/null @@ -1,25 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - "Part A" (UI.Label) - (UI.Indent - :Contents - (-> - "1." (UI.Label) - (UI.Indent - :Contents - (-> - "1.1." (UI.Label) - "1.2." (UI.Label))) - "2." (UI.Label))) - (UI.Separator) - "Part B" (UI.Label)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Indent/1.shs b/docs/samples/shards/UI/Indent/1.shs new file mode 100644 index 0000000000..0e065e56a5 --- /dev/null +++ b/docs/samples/shards/UI/Indent/1.shs @@ -0,0 +1,30 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + "Part A" | UI.Label + UI.Indent( + Contents: { + "1." | UI.Label + UI.Indent( + Contents: { + "1.1." | UI.Label + "1.2." | UI.Label + } + ) + "2." | UI.Label + } + ) + UI.Separator + "Part B" | UI.Label + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Int2Input/1.edn b/docs/samples/shards/UI/Int2Input/1.edn deleted file mode 100644 index d1f1a553ea..0000000000 --- a/docs/samples/shards/UI/Int2Input/1.edn +++ /dev/null @@ -1,15 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Int2Input - :Variable .int2) - (ExpectInt2)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Int2Input/1.shs b/docs/samples/shards/UI/Int2Input/1.shs new file mode 100644 index 0000000000..3b351c4906 --- /dev/null +++ b/docs/samples/shards/UI/Int2Input/1.shs @@ -0,0 +1,18 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Int2Input( + Variable: int2 + ) | ExpectInt2 + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Int2Slider/1.edn b/docs/samples/shards/UI/Int2Slider/1.edn deleted file mode 100644 index 44c4e73cc5..0000000000 --- a/docs/samples/shards/UI/Int2Slider/1.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Int2Slider - :Variable .int2 - :Min (int2 1) :Max (int2 100)) - (ExpectInt2)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Int2Slider/1.shs b/docs/samples/shards/UI/Int2Slider/1.shs new file mode 100644 index 0000000000..f2f4d5d725 --- /dev/null +++ b/docs/samples/shards/UI/Int2Slider/1.shs @@ -0,0 +1,20 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Int2Slider( + Variable: int2 + Min: @i2(1) + Max: @i2(100) + ) | ExpectInt2 + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Int3Input/1.edn b/docs/samples/shards/UI/Int3Input/1.edn deleted file mode 100644 index 1fd66bf956..0000000000 --- a/docs/samples/shards/UI/Int3Input/1.edn +++ /dev/null @@ -1,15 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Int3Input - :Variable .int3) - (ExpectInt3)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Int3Input/1.shs b/docs/samples/shards/UI/Int3Input/1.shs new file mode 100644 index 0000000000..8f8f81cef0 --- /dev/null +++ b/docs/samples/shards/UI/Int3Input/1.shs @@ -0,0 +1,18 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Int3Input( + Variable: int3 + ) | ExpectInt3 + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Int3Slider/1.edn b/docs/samples/shards/UI/Int3Slider/1.edn deleted file mode 100644 index b31461106e..0000000000 --- a/docs/samples/shards/UI/Int3Slider/1.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Int3Slider - :Variable .int3 - :Min (int3 1) :Max (int3 100)) - (ExpectInt3)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Int3Slider/1.shs b/docs/samples/shards/UI/Int3Slider/1.shs new file mode 100644 index 0000000000..6c02419e35 --- /dev/null +++ b/docs/samples/shards/UI/Int3Slider/1.shs @@ -0,0 +1,20 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Int3Slider( + Variable: int3 + Min: @i3(1) + Max: @i3(100) + ) | ExpectInt3 + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Int4Input/1.edn b/docs/samples/shards/UI/Int4Input/1.edn deleted file mode 100644 index 0dedd7a887..0000000000 --- a/docs/samples/shards/UI/Int4Input/1.edn +++ /dev/null @@ -1,15 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Int4Input - :Variable .int4) - (ExpectInt4)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Int4Input/1.shs b/docs/samples/shards/UI/Int4Input/1.shs new file mode 100644 index 0000000000..efc270f956 --- /dev/null +++ b/docs/samples/shards/UI/Int4Input/1.shs @@ -0,0 +1,18 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Int4Input( + Variable: int4 + ) | ExpectInt4 + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Int4Slider/1.edn b/docs/samples/shards/UI/Int4Slider/1.edn deleted file mode 100644 index aeaec13aec..0000000000 --- a/docs/samples/shards/UI/Int4Slider/1.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Int4Slider - :Variable .int4 - :Min (int4 1) :Max (int4 100)) - (ExpectInt4)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Int4Slider/1.shs b/docs/samples/shards/UI/Int4Slider/1.shs new file mode 100644 index 0000000000..2a6d48ac81 --- /dev/null +++ b/docs/samples/shards/UI/Int4Slider/1.shs @@ -0,0 +1,20 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Int4Slider( + Variable: int4 + Min: @i4(1) + Max: @i4(100) + ) | ExpectInt4 + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Int4Slider/2.edn b/docs/samples/shards/UI/Int4Slider/2.edn deleted file mode 100644 index d6dcc46cd1..0000000000 --- a/docs/samples/shards/UI/Int4Slider/2.edn +++ /dev/null @@ -1,18 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Int4Slider - :Label "My Label" - :Style {:color (color 255 128 64) :italics true} - :Variable .int4 - :Min (int4 1) :Max (int4 100)) - (ExpectInt4)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Int4Slider/2.shs b/docs/samples/shards/UI/Int4Slider/2.shs new file mode 100644 index 0000000000..ead27e1978 --- /dev/null +++ b/docs/samples/shards/UI/Int4Slider/2.shs @@ -0,0 +1,25 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Int4Slider( + Label: "My Label" + Style: { + color: @color(255 128 64) + italics: true + } + Variable: int4 + Min: @i4(1) + Max: @i4(100) + ) | ExpectInt4 + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/IntInput/1.edn b/docs/samples/shards/UI/IntInput/1.edn deleted file mode 100644 index 9c05c6a8f2..0000000000 --- a/docs/samples/shards/UI/IntInput/1.edn +++ /dev/null @@ -1,15 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.IntInput - :Variable .int) - (ExpectInt)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/IntInput/1.shs b/docs/samples/shards/UI/IntInput/1.shs new file mode 100644 index 0000000000..366253ef64 --- /dev/null +++ b/docs/samples/shards/UI/IntInput/1.shs @@ -0,0 +1,18 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.IntInput( + Variable: int + ) | ExpectInt + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/IntSlider/1.edn b/docs/samples/shards/UI/IntSlider/1.edn deleted file mode 100644 index d0d6203f95..0000000000 --- a/docs/samples/shards/UI/IntSlider/1.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.IntSlider - :Variable .int - :Min 1 :Max 100) - (ExpectInt)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/IntSlider/1.shs b/docs/samples/shards/UI/IntSlider/1.shs new file mode 100644 index 0000000000..5653bf5acd --- /dev/null +++ b/docs/samples/shards/UI/IntSlider/1.shs @@ -0,0 +1,20 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.IntSlider( + Variable: int + Min: 1 + Max: 100 + ) | ExpectInt + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/IntSlider/2.edn b/docs/samples/shards/UI/IntSlider/2.edn deleted file mode 100644 index f63b13fa0d..0000000000 --- a/docs/samples/shards/UI/IntSlider/2.edn +++ /dev/null @@ -1,18 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.IntSlider - :Label "My Label" - :Style {:color (color 255 128 64) :italics true} - :Variable .int - :Min 1 :Max 100) - (ExpectInt)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/IntSlider/2.shs b/docs/samples/shards/UI/IntSlider/2.shs new file mode 100644 index 0000000000..b45b4a7ee0 --- /dev/null +++ b/docs/samples/shards/UI/IntSlider/2.shs @@ -0,0 +1,25 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.IntSlider( + Label: "My Label" + Style: { + color: @color(255 128 64) + italics: true + } + Variable: int + Min: 1 + Max: 100 + ) | ExpectInt + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Label/1.edn b/docs/samples/shards/UI/Label/1.edn deleted file mode 100644 index 154081cb07..0000000000 --- a/docs/samples/shards/UI/Label/1.edn +++ /dev/null @@ -1,13 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - "Hello Shards!" (UI.Label)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Label/1.shs b/docs/samples/shards/UI/Label/1.shs new file mode 100644 index 0000000000..da63d55d27 --- /dev/null +++ b/docs/samples/shards/UI/Label/1.shs @@ -0,0 +1,16 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + "Hello Shards!" | UI.Label + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Label/2.edn b/docs/samples/shards/UI/Label/2.edn deleted file mode 100644 index 10ab88b5a5..0000000000 --- a/docs/samples/shards/UI/Label/2.edn +++ /dev/null @@ -1,19 +0,0 @@ -(def lorem_ipsum - "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.") - -(GFX.MainWindow - :Width 480 :Height 360 - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Columns - [(-> lorem_ipsum (UI.Label :Wrap true)) - nil - (-> lorem_ipsum (UI.Label :Wrap false))]))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Label/2.shs b/docs/samples/shards/UI/Label/2.shs new file mode 100644 index 0000000000..641f86bc5c --- /dev/null +++ b/docs/samples/shards/UI/Label/2.shs @@ -0,0 +1,26 @@ +@define(lorem_ipsum "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.") + +GFX.MainWindow( + Width: 480 + Height: 360 + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + UI.Columns( + [ + {@lorem_ipsum | UI.Label(Wrap: true)} + none + {@lorem_ipsum | UI.Label(Wrap: false)} + ] + ) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Label/3.edn b/docs/samples/shards/UI/Label/3.edn deleted file mode 100644 index eaeb9b9c4e..0000000000 --- a/docs/samples/shards/UI/Label/3.edn +++ /dev/null @@ -1,18 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - "Hello Shards!" (UI.Label) - "Hello Shards!" (UI.Label :Style {:strikethrough true}) - "Hello Shards!" (UI.Label :Style {:underline true}) - "Hello Shards!" (UI.Label :Style {:italics true}) - "Hello Shards!" (UI.Label :Style {:color (color 96 96 12)}) - "Hello Shards!" (UI.Label :Style {:color (color 12 96 96) :italics true})))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Label/3.shs b/docs/samples/shards/UI/Label/3.shs new file mode 100644 index 0000000000..4059008bf8 --- /dev/null +++ b/docs/samples/shards/UI/Label/3.shs @@ -0,0 +1,21 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + "Hello Shards!" | UI.Label + "Hello Shards!" | UI.Label(Style: {strikethrough: true}) + "Hello Shards!" | UI.Label(Style: {underline: true}) + "Hello Shards!" | UI.Label(Style: {italics: true}) + "Hello Shards!" | UI.Label(Style: {color: @color(96 96 12)}) + "Hello Shards!" | UI.Label(Style: {color: @color(12 96 96) italics: true}) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Layout/4.shs b/docs/samples/shards/UI/Layout/4.shs new file mode 100644 index 0000000000..e94bf083c8 --- /dev/null +++ b/docs/samples/shards/UI/Layout/4.shs @@ -0,0 +1,64 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + UI.LayoutClass( + MainDirection: LayoutDirection::RightToLeft + MinSize: @f2(200, 200) + MaxSize: @f2(600, 600) + Disabled: false + Frame: LayoutFrame::Widgets + ) >= scroll-frame-layout-class + UI.LayoutClass( + Parent: scroll-frame-layout-class + ) >= scroll-frame-layout-class-child + false >= checked + 1 >= choice + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Layout( + Class: scroll-frame-layout-class + Contents: { + "Wrapping text followed by example widgets:" | UI.Label + UI.Checkbox( + Label: "checkbox" + Variable: checked + ) + UI.RadioButton( + Label: "radio" + Variable: choice + Value: 1 + ) + UI.Button( + Label: "button" + Action: Msg("Clicked") + ) + } + ) + UI.Layout( + Class: scroll-frame-layout-class-child + Contents: { + "Wrapping text followed by example widgets:" | UI.Label + UI.Checkbox( + Label: "checkbox" + Variable: checked + ) + UI.RadioButton( + Label: "radio" + Variable: choice + Value: 1 + ) + UI.Button( + Label: "button" + Action: Msg("Clicked") + ) + } + ) + }) + ) + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/LeftPanel/1.edn b/docs/samples/shards/UI/LeftPanel/1.edn deleted file mode 100644 index 7ea0ac119b..0000000000 --- a/docs/samples/shards/UI/LeftPanel/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.LeftPanel - :Contents - (-> - "Left Panel" (UI.Label)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/LeftPanel/1.shs b/docs/samples/shards/UI/LeftPanel/1.shs new file mode 100644 index 0000000000..8adfb62bde --- /dev/null +++ b/docs/samples/shards/UI/LeftPanel/1.shs @@ -0,0 +1,18 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.LeftPanel( + Contents: { + "Left Panel" | UI.Label + } + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Link/1.edn b/docs/samples/shards/UI/Link/1.edn deleted file mode 100644 index 7bebefe0b5..0000000000 --- a/docs/samples/shards/UI/Link/1.edn +++ /dev/null @@ -1,13 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Link "Click here" (Msg "Hello"))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Link/1.shs b/docs/samples/shards/UI/Link/1.shs new file mode 100644 index 0000000000..f0817d03d8 --- /dev/null +++ b/docs/samples/shards/UI/Link/1.shs @@ -0,0 +1,16 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Link("Click here" Msg("Hello")) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Link/2.edn b/docs/samples/shards/UI/Link/2.edn deleted file mode 100644 index 483a4923e1..0000000000 --- a/docs/samples/shards/UI/Link/2.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (UI.Link - :Label "Click here" - :Style {:italics true} - :Action (Msg "Hello"))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Link/2.shs b/docs/samples/shards/UI/Link/2.shs new file mode 100644 index 0000000000..163b707b22 --- /dev/null +++ b/docs/samples/shards/UI/Link/2.shs @@ -0,0 +1,22 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + UI.Link( + Label: "Click here" + Style: { + italics: true + } + Action: Msg("Hello") + ) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/ListBox/1.edn b/docs/samples/shards/UI/ListBox/1.edn deleted file mode 100644 index a36f7abbe6..0000000000 --- a/docs/samples/shards/UI/ListBox/1.edn +++ /dev/null @@ -1,19 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - ["α Α" "ω Ω"] - (UI.ListBox :Index .index) - (ExpectString) >= .value - - (UI.Horizontal - (-> "Selected index: " (UI.Label) - .index (ToString) (UI.Label)))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/ListBox/1.shs b/docs/samples/shards/UI/ListBox/1.shs new file mode 100644 index 0000000000..01e89e317d --- /dev/null +++ b/docs/samples/shards/UI/ListBox/1.shs @@ -0,0 +1,22 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + ["α Α" "ω Ω"] | UI.ListBox(Index: index) + | ExpectString >= value + + UI.Horizontal({ + "Selected index: " | UI.Label + index | ToString | UI.Label + }) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/ListBox/2.edn b/docs/samples/shards/UI/ListBox/2.edn deleted file mode 100644 index 854a7100ae..0000000000 --- a/docs/samples/shards/UI/ListBox/2.edn +++ /dev/null @@ -1,23 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - [1 2 3 4 5 6 7 8 9] - (UI.ListBox - :Index .index - :Template - (-> - (ToString) (UI.Label))) - (ExpectInt) >= .value - - (UI.Horizontal - (-> "Selected index: " (UI.Label) - .index (ToString) (UI.Label)))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/ListBox/2.shs b/docs/samples/shards/UI/ListBox/2.shs new file mode 100644 index 0000000000..cbe7e2e5e0 --- /dev/null +++ b/docs/samples/shards/UI/ListBox/2.shs @@ -0,0 +1,28 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + [1 2 3 4 5 6 7 8 9] + | UI.ListBox( + Index: index + Template: { + ToString | UI.Label + } + ) + | ExpectInt >= value + + UI.Horizontal({ + "Selected index: " | UI.Label + index | ToString | UI.Label + }) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/ListBox/3.edn b/docs/samples/shards/UI/ListBox/3.edn deleted file mode 100644 index a5f9c3751d..0000000000 --- a/docs/samples/shards/UI/ListBox/3.edn +++ /dev/null @@ -1,33 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - - (Setup - -1 >= .clicked - [1 2 3 4 5 6 7 8 9] = .items) - - .items - (UI.ListBox - :IsSelected (-> - = .i - .clicked (If (IsLess 0) (-> false) - (-> (IsLessEqual .i)))) - :Clicked (-> > .clicked) - :Template - (-> - (ToString) (UI.Label))) - (ExpectInt) >= .value - - (UI.Horizontal - (-> "Selected index: " (UI.Label) - .clicked (ToString) (UI.Label)))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/ListBox/3.shs b/docs/samples/shards/UI/ListBox/3.shs new file mode 100644 index 0000000000..4955ecf4c2 --- /dev/null +++ b/docs/samples/shards/UI/ListBox/3.shs @@ -0,0 +1,43 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + Once({ + -1 >= clicked + [1 2 3 4 5 6 7 8 9] = items + }) + + items + | UI.ListBox( + IsSelected: { + = i + clicked | If(IsLess(0) + {false} + { + IsLessEqual(i) + }) + } + Clicked: { + > clicked + } + Template: { + ToString | UI.Label + } + ) + | ExpectInt >= value + + UI.Horizontal({ + "Selected index: " | UI.Label + clicked | ToString | UI.Label + }) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/MarkdownViewer/1.edn b/docs/samples/shards/UI/MarkdownViewer/1.edn deleted file mode 100644 index 9355918c54..0000000000 --- a/docs/samples/shards/UI/MarkdownViewer/1.edn +++ /dev/null @@ -1,19 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.TopPanel - :Contents - (-> - "# Title - -## Sub-title -**list:** -- item 1 -- item 2" (UI.MarkdownViewer)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/MarkdownViewer/1.shs b/docs/samples/shards/UI/MarkdownViewer/1.shs new file mode 100644 index 0000000000..3c340e178b --- /dev/null +++ b/docs/samples/shards/UI/MarkdownViewer/1.shs @@ -0,0 +1,23 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.TopPanel( + Contents: { + "# Title + +## Sub-title +**list:** +- item 1 +- item 2" | UI.MarkdownViewer + } + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/MarkdownViewer/2.edn b/docs/samples/shards/UI/MarkdownViewer/2.edn deleted file mode 100644 index adc8109851..0000000000 --- a/docs/samples/shards/UI/MarkdownViewer/2.edn +++ /dev/null @@ -1,20 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - :Contents - (-> - (Setup - "shards/UI/MarkdownViewer/sample.md" (FS.Read) = .text) - - (UI.ScrollArea - :Contents - (-> - .text (UI.MarkdownViewer)))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/MarkdownViewer/2.shs b/docs/samples/shards/UI/MarkdownViewer/2.shs new file mode 100644 index 0000000000..f551ccffbb --- /dev/null +++ b/docs/samples/shards/UI/MarkdownViewer/2.shs @@ -0,0 +1,26 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + Contents: { + Once({ + "shards/UI/MarkdownViewer/sample.md" | FS.Read = text + }) + + UI.ScrollArea( + Contents: { + text | UI.MarkdownViewer + } + ) + } + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/MarkdownViewer/sample.md b/docs/samples/shards/UI/MarkdownViewer/sample.md index 17f6832142..fae759bf8f 100644 --- a/docs/samples/shards/UI/MarkdownViewer/sample.md +++ b/docs/samples/shards/UI/MarkdownViewer/sample.md @@ -8,27 +8,33 @@ **Code** ```clj -(defloop main-wire - (GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.TopPanel - :Contents - (-> - "# Title +@wire(main-wire { + GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.TopPanel( + Contents: { + "# Title ## Sub-title **list:** - item 1 -- item 2" (UI.MarkdownViewer)))) +- item 2" | UI.MarkdownViewer + } + ) + ) - (GFX.Render :Steps .render-steps)))) -(defmesh root) -(schedule root main-wire) -(run root 0.1 10) -``` + GFX.Render(Steps: render-steps) + } + ) +} Looped: true) + +@mesh(root) +@schedule(root main-wire) +@run(root 0.1 10) +``` \ No newline at end of file diff --git a/docs/samples/shards/UI/Menu/1.edn b/docs/samples/shards/UI/Menu/1.edn deleted file mode 100644 index f6cf375850..0000000000 --- a/docs/samples/shards/UI/Menu/1.edn +++ /dev/null @@ -1,17 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.TopPanel - :Contents - (UI.MenuBar - (UI.Menu - :Title "File" - :Contents - (UI.Button "Exit"))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Menu/1.shs b/docs/samples/shards/UI/Menu/1.shs new file mode 100644 index 0000000000..5da9c54be3 --- /dev/null +++ b/docs/samples/shards/UI/Menu/1.shs @@ -0,0 +1,23 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.TopPanel( + Contents: + UI.MenuBar( + UI.Menu( + Title: "File" + Contents: + UI.Button("Exit") + ) + ) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/MenuBar/1.edn b/docs/samples/shards/UI/MenuBar/1.edn deleted file mode 100644 index c9c7dbde6c..0000000000 --- a/docs/samples/shards/UI/MenuBar/1.edn +++ /dev/null @@ -1,17 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.TopPanel - :Contents - (UI.MenuBar - :Contents - (UI.Menu - "Menu" - (-> "Some Text" (UI.Label)))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/MenuBar/1.shs b/docs/samples/shards/UI/MenuBar/1.shs new file mode 100644 index 0000000000..815243fb87 --- /dev/null +++ b/docs/samples/shards/UI/MenuBar/1.shs @@ -0,0 +1,22 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.TopPanel( + Contents: + UI.MenuBar( + Contents: + UI.Menu("Menu" { + "Some Text" | UI.Label + }) + ) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/NextRow/1.edn b/docs/samples/shards/UI/NextRow/1.edn deleted file mode 100644 index 35937dae84..0000000000 --- a/docs/samples/shards/UI/NextRow/1.edn +++ /dev/null @@ -1,26 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Grid - :Striped true - :Contents - (-> - "Col 1" (UI.Label) - "Col 2" (UI.Label) - "Col 3" (UI.Label) - (UI.NextRow) - "Hello" (UI.Label) - "shards" (UI.Label) - "!" (UI.Label) - (UI.NextRow) - "Lorem ipsum dolor sit amet" (UI.Label) - "consectetur adipiscing elit" (UI.Label) - "sed do eiusmod tempor" (UI.Label))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/NextRow/1.shs b/docs/samples/shards/UI/NextRow/1.shs new file mode 100644 index 0000000000..846576077c --- /dev/null +++ b/docs/samples/shards/UI/NextRow/1.shs @@ -0,0 +1,31 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + UI.Grid( + Striped: true + Contents: { + "Col 1" | UI.Label + "Col 2" | UI.Label + "Col 3" | UI.Label + UI.NextRow + "Hello" | UI.Label + "shards" | UI.Label + "!" | UI.Label + UI.NextRow + "Lorem ipsum dolor sit amet" | UI.Label + "consectetur adipiscing elit" | UI.Label + "sed do eiusmod tempor" | UI.Label + } + ) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Plot/1.edn b/docs/samples/shards/UI/Plot/1.edn deleted file mode 100644 index 06619457ee..0000000000 --- a/docs/samples/shards/UI/Plot/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Plot - (-> - [(float2 -1) (float2 0) (float2 1)] (UI.PlotLine))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Plot/1.shs b/docs/samples/shards/UI/Plot/1.shs new file mode 100644 index 0000000000..0ebe7fd029 --- /dev/null +++ b/docs/samples/shards/UI/Plot/1.shs @@ -0,0 +1,18 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + UI.Plot({ + [@f2(-1) @f2(0) @f2(1)] | UI.PlotLine + }) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Plot/2.edn b/docs/samples/shards/UI/Plot/2.edn deleted file mode 100644 index faba0a6b4c..0000000000 --- a/docs/samples/shards/UI/Plot/2.edn +++ /dev/null @@ -1,32 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (-> - (UI.TopPanel - :Contents - (UI.Checkbox "Horizontal" .horizontal)) - (UI.CentralPanel - (UI.Plot - (-> - [] >= .hist - (ForRange - -40 39 - (-> - (Setup - 0.02 (Math.Multiply 3.1415926535) (Math.Sqrt) = .f) - (ToFloat) (Math.Divide 10.0) (Math.Add 0.05) >= .x - .x (Math.Multiply .x) (Math.Divide -2.0) (Math.Exp) (Math.Divide .f) >= .y - [.x .y] (ToFloat2) >> .hist)) - - .hist (ExpectLike [(float2 0)]) - (UI.PlotBar - :Horizontal .horizontal - :Width 0.095 - :Color (color 173 216 230))))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Plot/2.shs b/docs/samples/shards/UI/Plot/2.shs new file mode 100644 index 0000000000..435481ac60 --- /dev/null +++ b/docs/samples/shards/UI/Plot/2.shs @@ -0,0 +1,39 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + { + UI.TopPanel( + Contents: UI.Checkbox("Horizontal" horizontal) + ) + UI.CentralPanel( + UI.Plot({ + [] >= hist + ForRange(-40 39 { + Once({ + 0.02 | Math.Multiply(3.1415926535) | Math.Sqrt = f + }) + + | ToFloat | Math.Divide(10.0) | Math.Add(0.05) >= x + | Math.Multiply(x) | Math.Divide(-2.0) | Math.Exp | Math.Divide(f) >= y + [x y] | ToFloat2 >> hist + }) + + hist | ExpectLike([@f2(0)]) + UI.PlotBar( + Horizontal: horizontal + Width: 0.095 + Color: @color(173 216 230) + ) + }) + ) + } + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Plot/3.edn b/docs/samples/shards/UI/Plot/3.edn deleted file mode 100644 index 5c68f6c7f1..0000000000 --- a/docs/samples/shards/UI/Plot/3.edn +++ /dev/null @@ -1,27 +0,0 @@ -(def N 32) -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Plot - :Legend true - :Contents - (-> - [] >= .sin - (ForRange - (- N) N - (-> - (ToFloat) (Math.Divide (/ N 3.1415926535)) >= .x - .x (Math.Sin) >= .y - [.x .y] (ToFloat2) >> .sin)) - .sin (ExpectLike [(float2 0)]) - (UI.PlotPoints - :Color (color 200 100 100) - :Name "sin"))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Plot/3.shs b/docs/samples/shards/UI/Plot/3.shs new file mode 100644 index 0000000000..901821b33d --- /dev/null +++ b/docs/samples/shards/UI/Plot/3.shs @@ -0,0 +1,37 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + 32 >= n + n | Math.Negate >= negated-n + n | ToFloat | Math.Divide(3.1415926535) >= n-divided-by-pi + }) + UI( + ui-draw-queue + UI.CentralPanel( + UI.Plot( + Legend: true + Contents: { + [] >= sin + ForRange( + negated-n n + { + | ToFloat | Math.Divide(n-divided-by-pi) >= x + x | Math.Sin >= y + [x y] | ToFloat2 >> sin + } + ) + sin | ExpectLike([@f2(0)]) + | UI.PlotPoints( + Color: @color(200 100 100) + Name: "sin" + ) + } + ) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/PlotBar/2.edn b/docs/samples/shards/UI/PlotBar/2.edn deleted file mode 100644 index faba0a6b4c..0000000000 --- a/docs/samples/shards/UI/PlotBar/2.edn +++ /dev/null @@ -1,32 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (-> - (UI.TopPanel - :Contents - (UI.Checkbox "Horizontal" .horizontal)) - (UI.CentralPanel - (UI.Plot - (-> - [] >= .hist - (ForRange - -40 39 - (-> - (Setup - 0.02 (Math.Multiply 3.1415926535) (Math.Sqrt) = .f) - (ToFloat) (Math.Divide 10.0) (Math.Add 0.05) >= .x - .x (Math.Multiply .x) (Math.Divide -2.0) (Math.Exp) (Math.Divide .f) >= .y - [.x .y] (ToFloat2) >> .hist)) - - .hist (ExpectLike [(float2 0)]) - (UI.PlotBar - :Horizontal .horizontal - :Width 0.095 - :Color (color 173 216 230))))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/PlotBar/2.shs b/docs/samples/shards/UI/PlotBar/2.shs new file mode 100644 index 0000000000..435481ac60 --- /dev/null +++ b/docs/samples/shards/UI/PlotBar/2.shs @@ -0,0 +1,39 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + { + UI.TopPanel( + Contents: UI.Checkbox("Horizontal" horizontal) + ) + UI.CentralPanel( + UI.Plot({ + [] >= hist + ForRange(-40 39 { + Once({ + 0.02 | Math.Multiply(3.1415926535) | Math.Sqrt = f + }) + + | ToFloat | Math.Divide(10.0) | Math.Add(0.05) >= x + | Math.Multiply(x) | Math.Divide(-2.0) | Math.Exp | Math.Divide(f) >= y + [x y] | ToFloat2 >> hist + }) + + hist | ExpectLike([@f2(0)]) + UI.PlotBar( + Horizontal: horizontal + Width: 0.095 + Color: @color(173 216 230) + ) + }) + ) + } + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/PlotLine/1.edn b/docs/samples/shards/UI/PlotLine/1.edn deleted file mode 100644 index 06619457ee..0000000000 --- a/docs/samples/shards/UI/PlotLine/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Plot - (-> - [(float2 -1) (float2 0) (float2 1)] (UI.PlotLine))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/PlotLine/1.shs b/docs/samples/shards/UI/PlotLine/1.shs new file mode 100644 index 0000000000..0ebe7fd029 --- /dev/null +++ b/docs/samples/shards/UI/PlotLine/1.shs @@ -0,0 +1,18 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + UI.Plot({ + [@f2(-1) @f2(0) @f2(1)] | UI.PlotLine + }) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/PlotPoints/3.edn b/docs/samples/shards/UI/PlotPoints/3.edn deleted file mode 100644 index 5c68f6c7f1..0000000000 --- a/docs/samples/shards/UI/PlotPoints/3.edn +++ /dev/null @@ -1,27 +0,0 @@ -(def N 32) -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Plot - :Legend true - :Contents - (-> - [] >= .sin - (ForRange - (- N) N - (-> - (ToFloat) (Math.Divide (/ N 3.1415926535)) >= .x - .x (Math.Sin) >= .y - [.x .y] (ToFloat2) >> .sin)) - .sin (ExpectLike [(float2 0)]) - (UI.PlotPoints - :Color (color 200 100 100) - :Name "sin"))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/PlotPoints/3.shs b/docs/samples/shards/UI/PlotPoints/3.shs new file mode 100644 index 0000000000..901821b33d --- /dev/null +++ b/docs/samples/shards/UI/PlotPoints/3.shs @@ -0,0 +1,37 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + 32 >= n + n | Math.Negate >= negated-n + n | ToFloat | Math.Divide(3.1415926535) >= n-divided-by-pi + }) + UI( + ui-draw-queue + UI.CentralPanel( + UI.Plot( + Legend: true + Contents: { + [] >= sin + ForRange( + negated-n n + { + | ToFloat | Math.Divide(n-divided-by-pi) >= x + x | Math.Sin >= y + [x y] | ToFloat2 >> sin + } + ) + sin | ExpectLike([@f2(0)]) + | UI.PlotPoints( + Color: @color(200 100 100) + Name: "sin" + ) + } + ) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/ProgressBar/1.edn b/docs/samples/shards/UI/ProgressBar/1.edn deleted file mode 100644 index 24e9c3f8ed..0000000000 --- a/docs/samples/shards/UI/ProgressBar/1.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (Setup - 0.0 >= .progress) - .progress (UI.ProgressBar :Overlay "Progress") - (Math.Add 0.01) > .progress))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/ProgressBar/1.shs b/docs/samples/shards/UI/ProgressBar/1.shs new file mode 100644 index 0000000000..68ddd75eb0 --- /dev/null +++ b/docs/samples/shards/UI/ProgressBar/1.shs @@ -0,0 +1,20 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + Once({ + 0.0 >= progress + }) + progress | UI.ProgressBar(Overlay: "Progress") + | Math.Add(0.01) > progress + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Property/1.edn b/docs/samples/shards/UI/Property/1.edn deleted file mode 100644 index fa6ad39f89..0000000000 --- a/docs/samples/shards/UI/Property/1.edn +++ /dev/null @@ -1,13 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - :Contents - (-> - (UI.Property UIProperty.RemainingSpace) - (Once (Log))))))) diff --git a/docs/samples/shards/UI/Property/1.shs b/docs/samples/shards/UI/Property/1.shs new file mode 100644 index 0000000000..85dd74c335 --- /dev/null +++ b/docs/samples/shards/UI/Property/1.shs @@ -0,0 +1,21 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + Contents: { + UI.Property(UIProperty::RemainingSpace) + Once({ + | Log + }) + } + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/RadioButton/1.edn b/docs/samples/shards/UI/RadioButton/1.edn deleted file mode 100644 index 789a48fff3..0000000000 --- a/docs/samples/shards/UI/RadioButton/1.edn +++ /dev/null @@ -1,19 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (Setup 2 >= .choice) - (UI.RadioButton - :Label "Choice 1" - :Variable .choice - :Value 1) - (UI.RadioButton "Choice 2" .choice 2) - (UI.RadioButton "Choice 3" .choice 3)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/RadioButton/1.shs b/docs/samples/shards/UI/RadioButton/1.shs new file mode 100644 index 0000000000..8b89daa6b4 --- /dev/null +++ b/docs/samples/shards/UI/RadioButton/1.shs @@ -0,0 +1,25 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + Once({ + 2 >= choice + }) + UI.RadioButton( + Label: "Choice 1" + Variable: choice + Value: 1 + ) + UI.RadioButton("Choice 2" choice 2) + UI.RadioButton("Choice 3" choice 3) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/RadioButton/2.edn b/docs/samples/shards/UI/RadioButton/2.edn deleted file mode 100644 index 440d15b36d..0000000000 --- a/docs/samples/shards/UI/RadioButton/2.edn +++ /dev/null @@ -1,20 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (Setup 2 >= .choice) - (UI.RadioButton :Label "Choice 1" :Style {} :Variable .choice :Value 1) - (UI.RadioButton - :Label "Choice 2" - :Style {:underline true} - :Variable .choice - :Value 2) - (UI.RadioButton :Label "Choice 3" :Style {} :Variable .choice :Value 3)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/RadioButton/2.shs b/docs/samples/shards/UI/RadioButton/2.shs new file mode 100644 index 0000000000..ff3eea3b0f --- /dev/null +++ b/docs/samples/shards/UI/RadioButton/2.shs @@ -0,0 +1,26 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + Once({ + 2 >= choice + }) + UI.RadioButton(Label: "Choice 1" Style: {} Variable: choice Value: 1) + UI.RadioButton( + Label: "Choice 2" + Style: {underline: true} + Variable: choice + Value: 2 + ) + UI.RadioButton(Label: "Choice 3" Style: {} Variable: choice Value: 3) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Reset/1.edn b/docs/samples/shards/UI/Reset/1.edn deleted file mode 100644 index be682e3400..0000000000 --- a/docs/samples/shards/UI/Reset/1.edn +++ /dev/null @@ -1,30 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (-> - (UI.TopPanel - :Contents - (UI.MenuBar - (UI.Menu - :Title "File" - :Contents - (UI.Tooltip - :Contents - (UI.Button "Reset UI memory" (UI.Reset)) - :OnHover - (-> - "Forget scroll, positions, sizes, etc." (UI.Label)))))) - - (UI.Window - :Title "My Window" - :Position (float2 10 100) - :Contents - (-> "Lorem ipsum" (UI.Label) - (UI.Separator))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Reset/1.shs b/docs/samples/shards/UI/Reset/1.shs new file mode 100644 index 0000000000..786a235ea1 --- /dev/null +++ b/docs/samples/shards/UI/Reset/1.shs @@ -0,0 +1,38 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + { + UI.TopPanel(Contents: { + UI.MenuBar( + UI.Menu( + Title: "File" + Contents: { + UI.Tooltip(Contents: { + UI.Button("Reset UI memory" UI.Reset) + } + OnHover: { + "Forget scroll, positions, sizes, etc" | UI.Label + }) + } + ) + ) + }) + UI.Window( + Title: "My Window" + Position: @f2(10 100) + Contents: { + "Lorem ipsum" | UI.Label + UI.Separator + } + ) + } + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/RightPanel/1.edn b/docs/samples/shards/UI/RightPanel/1.edn deleted file mode 100644 index 1adbeb1db6..0000000000 --- a/docs/samples/shards/UI/RightPanel/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.RightPanel - :Contents - (-> - "Right Panel" (UI.Label)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/RightPanel/1.shs b/docs/samples/shards/UI/RightPanel/1.shs new file mode 100644 index 0000000000..c750856068 --- /dev/null +++ b/docs/samples/shards/UI/RightPanel/1.shs @@ -0,0 +1,16 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.RightPanel(Contents: { + "Right Panel" | UI.Label + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Scope/1.edn b/docs/samples/shards/UI/Scope/1.edn deleted file mode 100644 index 340c1fb650..0000000000 --- a/docs/samples/shards/UI/Scope/1.edn +++ /dev/null @@ -1,16 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Scope - :Contents - (-> - ;; UI here - nil)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Scope/1.shs b/docs/samples/shards/UI/Scope/1.shs new file mode 100644 index 0000000000..22ac976bdc --- /dev/null +++ b/docs/samples/shards/UI/Scope/1.shs @@ -0,0 +1,19 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + UI.Scope(Contents: { + ;; UI here + none + }) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/ScrollArea/1.edn b/docs/samples/shards/UI/ScrollArea/1.edn deleted file mode 100644 index d88d724a05..0000000000 --- a/docs/samples/shards/UI/ScrollArea/1.edn +++ /dev/null @@ -1,20 +0,0 @@ -(def lorem_ipsum - "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.") - -(GFX.MainWindow - :Width 480 :Height 320 - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.ScrollArea - :Horizontal true - :Contents - (-> - lorem_ipsum (UI.Label :Wrap false))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/ScrollArea/1.shs b/docs/samples/shards/UI/ScrollArea/1.shs new file mode 100644 index 0000000000..5efadc45c2 --- /dev/null +++ b/docs/samples/shards/UI/ScrollArea/1.shs @@ -0,0 +1,24 @@ +@define(lorem_ipsum "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.") + +GFX.MainWindow( + Width: 480 Height: 320 + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + UI.ScrollArea( + Horizontal: true + Contents: { + @lorem_ipsum | UI.Label(Wrap: false) + } + ) + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Separator/1.edn b/docs/samples/shards/UI/Separator/1.edn deleted file mode 100644 index 7e1cf618c7..0000000000 --- a/docs/samples/shards/UI/Separator/1.edn +++ /dev/null @@ -1,15 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - "Hello" (UI.Label) - (UI.Separator) - "World" (UI.Label)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Separator/1.shs b/docs/samples/shards/UI/Separator/1.shs new file mode 100644 index 0000000000..4418c76e39 --- /dev/null +++ b/docs/samples/shards/UI/Separator/1.shs @@ -0,0 +1,18 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + "Hello" | UI.Label + UI.Separator + "World" | UI.Label + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Spinner/1.edn b/docs/samples/shards/UI/Spinner/1.edn deleted file mode 100644 index 1469cf774d..0000000000 --- a/docs/samples/shards/UI/Spinner/1.edn +++ /dev/null @@ -1,13 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Spinner))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Spinner/1.shs b/docs/samples/shards/UI/Spinner/1.shs new file mode 100644 index 0000000000..691de6648b --- /dev/null +++ b/docs/samples/shards/UI/Spinner/1.shs @@ -0,0 +1,16 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + UI.Spinner + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Style/1.edn b/docs/samples/shards/UI/Style/1.edn deleted file mode 100644 index d43433b97d..0000000000 --- a/docs/samples/shards/UI/Style/1.edn +++ /dev/null @@ -1,29 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - :Contents - (-> - (UI.Style - :OverrideTextStyle "MyStyle" - :TextStyles {:MyStyle {:Size 36.0 - :Family FontFamily.Monospace}}) - "Hello Shards!" (UI.Label) - - (UI.Style :TextStyles {:MyStyle {:Size 16.0 :Family FontFamily.Monospace}}) - "Hello Shards!" (UI.Label) - - (UI.Style :TextStyles {:MyStyle {:Size 20.0 :Family FontFamily.Proportional}}) - "Hello Shards!" (UI.Label) - - ;; (UI.Style :TextStyles {:MyStyle {:Size 24.0 :Family FontFamily.Monospace}}) - ;; (UI.Button "Button") - ; - ))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Style/1.shs b/docs/samples/shards/UI/Style/1.shs new file mode 100644 index 0000000000..e64878ddef --- /dev/null +++ b/docs/samples/shards/UI/Style/1.shs @@ -0,0 +1,61 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel( + Contents: { + UI.Style( + OverrideTextStyle: "MyStyle" + TextStyles: { + MyStyle: { + Size: 36.0 + Family: FontFamily::Monospace + } + } + ) + + "Hello Shards!" | UI.Label + + UI.Style( + TextStyles: { + MyStyle: { + Size: 16.0 + Family: FontFamily::Monospace + } + } + ) + + "Hello Shards!" | UI.Label + + UI.Style( + TextStyles: { + MyStyle: { + Size: 20.0 + Family: FontFamily::Proportional + } + } + ) + + "Hello Shards!" | UI.Label + + UI.Style( + TextStyles: { + MyStyle: { + Size: 24.0 + Family: FontFamily::Monospace + } + } + ) + + UI.Button("Button") + } + ) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Style/2.edn b/docs/samples/shards/UI/Style/2.edn deleted file mode 100644 index 0f5947e766..0000000000 --- a/docs/samples/shards/UI/Style/2.edn +++ /dev/null @@ -1,38 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (Setup - 64 >= .hue - 0 >= .r >= .g - (color 0 0 0 0) >= .color - 16.0 >= .size) - - 255 (Math.Subtract .hue) (Math.Multiply 2) (Min 255) > .r - .hue (Math.Multiply 2) (Min 255) > .g - [.r .g 0 255] (ToColor) > .color - - (UI.Scope - (-> - (UI.Style - :OverrideTextStyle "MyStyle" - :TextStyles {:MyStyle {:Size .size - :Family FontFamily.Monospace}} - :OverrideTextColor .color) - (UI.IntSlider - :Variable .hue - :Min 0 :Max 255) - (UI.FloatSlider - :Variable .size - :Min 8.0 :Max 96.0) - "Hello Shards!" (UI.Label))) - - "This text is not affected" (UI.Label)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Style/2.shs b/docs/samples/shards/UI/Style/2.shs new file mode 100644 index 0000000000..3f880180d3 --- /dev/null +++ b/docs/samples/shards/UI/Style/2.shs @@ -0,0 +1,44 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.CentralPanel({ + Once({ + 64 >= hue + 0 >= r >= g + @color(0 0 0 0) >= color + 16.0 >= size + }) + + 255 | Math.Subtract(hue) | Math.Multiply(2) | Min(255) > r + hue | Math.Multiply(2) | Min(255) > g + [r g 0 255] | ToColor > color + + UI.Scope({ + UI.Style( + OverrideTextStyle: "MyStyle" + TextStyles: { + MyStyle: { + Size: size + Family: FontFamily::Monospace + } + } + OverrideTextColor: color + ) + + UI.IntSlider(Variable: hue Min: 0 Max: 255) + UI.FloatSlider(Variable: size Min: 8.0 Max: 96.0) + "Hello Shards!" | UI.Label + }) + + "This text is not affected" | UI.Label + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Tab/1.edn b/docs/samples/shards/UI/Tab/1.edn deleted file mode 100644 index cbef44374d..0000000000 --- a/docs/samples/shards/UI/Tab/1.edn +++ /dev/null @@ -1,21 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.DockArea - :Contents - (-> - (UI.Tab - :Title "Tab 1" - :Contents - (-> "Tab 1 contents" (UI.Label))) - (UI.Tab - :Title "Tab 2" - :Contents - (-> "Tab 2 contents" (UI.Label)))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Tab/1.shs b/docs/samples/shards/UI/Tab/1.shs new file mode 100644 index 0000000000..fd1b36d893 --- /dev/null +++ b/docs/samples/shards/UI/Tab/1.shs @@ -0,0 +1,21 @@ +GFX.MainWindow( + Contents: { + Once({ + GFX.DrawQueue >= ui-draw-queue + GFX.UIPass(ui-draw-queue) >> render-steps + }) + UI( + ui-draw-queue + UI.DockArea({ + UI.Tab(Title: "Tab 1" Contents: { + "Tab 1 contents" | UI.Label + }) + UI.Tab(Title: "Tab 2" Contents: { + "Tab 2 contents" | UI.Label + }) + }) + ) + + GFX.Render(Steps: render-steps) + } +) \ No newline at end of file diff --git a/docs/samples/shards/UI/Table/1.edn b/docs/samples/shards/UI/Table/1.edn deleted file mode 100644 index 5f7320003b..0000000000 --- a/docs/samples/shards/UI/Table/1.edn +++ /dev/null @@ -1,30 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - :Contents - (-> - [{:Name "Doe" :Surname "John"} - {:Name "Dough" :Surname "Jane"} - {:Name "Smith" :Surname "Dick"}] - (UI.Table - :Resizable true - :Striped true - :RowIndex .index - :Columns - [{:Initial (float 20)} - {:Header "Surname" - :Initial (float 100) :AtLeast (float 60) :AtMost (float 160)} - {:Header "Name" - :Initial (float 80) :AtLeast (float 60) :AtMost (float 160)}] - :Builder - [(-> .index (ToString) (UI.Label)) - (-> (Take "Surname") (UI.Label)) - (-> (Take "Name") (UI.Label))])))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Table/2.edn b/docs/samples/shards/UI/Table/2.edn deleted file mode 100644 index 275c529cef..0000000000 --- a/docs/samples/shards/UI/Table/2.edn +++ /dev/null @@ -1,25 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - :Contents - (-> - [(int2 0) (int2 0 1) (int2 1) (int2 1 0)] - (UI.Table - :Columns - [{:Header "A"} - {:Header "B"} - {:Header "A xor B"}] - :Builder - [(-> (Take 0) (ToString) (UI.Label)) - (-> (Take 1) (ToString) (UI.Label)) - (-> (| (Take 0) >= .a) - (| (Take 1) >= .b) - .a (Math.Xor .b) (ToString) (UI.Label))])))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Table/3.edn b/docs/samples/shards/UI/Table/3.edn deleted file mode 100644 index 0bf29abed8..0000000000 --- a/docs/samples/shards/UI/Table/3.edn +++ /dev/null @@ -1,33 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - :Contents - (-> - [{:Name "Doe" :Surname "John"} - {:Name "Dough" :Surname "Jane"} - {:Name "Smith" :Surname "Dick"}] - (UI.Table - :Resizable true - :Striped true - :RowIndex .index - :Columns - [{:Initial (float 20)} - {:Header "Surname" - :Initial (float 100) :AtLeast (float 60) :AtMost (float 160)} - {:Header - (-> "Name" (UI.Label :Style {:text_style "Heading"}) - (UI.Button "Up" (Msg "Clicked Up") :Style {:text_style "Small"}) - (UI.Button "Down" (Msg "Clicked Down") :Style {:text_style "Small"})) - :Initial (float 120) :AtLeast (float 100) :AtMost (float 160)}] - :Builder - [(-> .index (ToString) (UI.Label)) - (-> (Take "Surname") (UI.Label)) - (-> (Take "Name") (UI.Label))])))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/TextField/1.edn b/docs/samples/shards/UI/TextField/1.edn deleted file mode 100644 index 9b9773fe36..0000000000 --- a/docs/samples/shards/UI/TextField/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - (Setup "Lorem ipsum dolor sit amet" >= .text) - (UI.TextField :Variable .text :Multiline false)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/TextField/2.edn b/docs/samples/shards/UI/TextField/2.edn deleted file mode 100644 index 9a00a0323e..0000000000 --- a/docs/samples/shards/UI/TextField/2.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - ;; read-only - (UI.TextField "Lorem ipsum dolor sit amet")))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/TextField/3.edn b/docs/samples/shards/UI/TextField/3.edn deleted file mode 100644 index e44e6cfdee..0000000000 --- a/docs/samples/shards/UI/TextField/3.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (-> - ;; exposing a new variable - (UI.TextField .text)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Tooltip/1.edn b/docs/samples/shards/UI/Tooltip/1.edn deleted file mode 100644 index 93c390e934..0000000000 --- a/docs/samples/shards/UI/Tooltip/1.edn +++ /dev/null @@ -1,18 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Tooltip - :Contents - (-> - "Lorem ipsum" (UI.Label)) - :OnHover - (-> - "Tooltip" (UI.Label))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/TopPanel/1.edn b/docs/samples/shards/UI/TopPanel/1.edn deleted file mode 100644 index 287c791f85..0000000000 --- a/docs/samples/shards/UI/TopPanel/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.TopPanel - :Contents - (-> - "Top Panel" (UI.Label)))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Variable/1.edn b/docs/samples/shards/UI/Variable/1.edn deleted file mode 100644 index cf289f177a..0000000000 --- a/docs/samples/shards/UI/Variable/1.edn +++ /dev/null @@ -1,14 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (Setup - (float4 -1 0 0 1) >= .my-var) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Variable .my-var))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Vertical/1.edn b/docs/samples/shards/UI/Vertical/1.edn deleted file mode 100644 index a3ad3e0319..0000000000 --- a/docs/samples/shards/UI/Vertical/1.edn +++ /dev/null @@ -1,17 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Vertical - :Contents - (-> - "Hello" (UI.Label) - (UI.Separator) - "World" (UI.Label))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Vertical/2.edn b/docs/samples/shards/UI/Vertical/2.edn deleted file mode 100644 index 7b0569bfd3..0000000000 --- a/docs/samples/shards/UI/Vertical/2.edn +++ /dev/null @@ -1,20 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - .ui-draw-queue (GFX.ClearQueue) - - (UI - .ui-draw-queue - (UI.CentralPanel - (UI.Vertical - :Centered true - :Contents - (-> - "Hello" (UI.Label) - (UI.Separator) - "World" (UI.Label))))) - - (GFX.Render :Steps .render-steps))) diff --git a/docs/samples/shards/UI/Window/1.edn b/docs/samples/shards/UI/Window/1.edn deleted file mode 100644 index ba10b0bae7..0000000000 --- a/docs/samples/shards/UI/Window/1.edn +++ /dev/null @@ -1,15 +0,0 @@ -(GFX.MainWindow - :Contents - (-> - (Setup - (GFX.DrawQueue) >= .ui-draw-queue - (GFX.UIPass .ui-draw-queue) >> .render-steps) - (UI - .ui-draw-queue - (UI.Window - :Title "Greetings" :Flags WindowFlags.NoCollapse - :Contents - (-> - "Hello shards!" (UI.Label)))) - - (GFX.Render :Steps .render-steps)))