Slab icon indicating copy to clipboard operation
Slab copied to clipboard

Multiple examples

Open belohlavek opened this issue 4 years ago • 4 comments

I would suggest creating an examples folder with multiple examples, especially for different layout permutations as it gets harder to achieve the desired results (like nested controls inside a layout) without a proper example on how to do it!

Different sized columns are also hard to figure out!

belohlavek avatar Mar 29 '20 21:03 belohlavek

This is something I have been considering as it would help ease users into using more complex features. I have also been considering making a simple application that uses Slab and providing that as reference.

coding-jackalope avatar Mar 30 '20 00:03 coding-jackalope

I'm personally interested in two specific things:

Adavanced layout usage (nesting, aligning, resizing, custom size columns) Creation of custom controls/widgets via usage of Region

More docs on how the layout manager works would be great too. I'm still strugging to have a simple sidebar and a custom control that makes use of region and overlayed images next to each other :)

belohlavek avatar Mar 30 '20 03:03 belohlavek

I've seen that the file dialog achieves a column with sidebar like layout by moving the cursor rather than using the lauyout manager. Are there any reasons for this? Am I understanding wrong?

Region.Begin(
   "FileDialog_DirectoryExplorer",
   {
       X = CursorX,
       Y = CursorY,
       W = ExplorerW,
       H = ListH
       -- more...
   }
)

Cursor.AdvanceX(0.0)
Cursor.SetAnchorX(Cursor.GetX())

FileDialogExplorer(ActiveInstance, ActiveInstance.Root)

Region.End()
Region.ApplyScissor()
Cursor.AdvanceX(ExplorerW + 4.0)
Cursor.SetY(CursorY)
-- Layout for the Lisbox...

belohlavek avatar Mar 30 '20 13:03 belohlavek

Hi @belohlavek is this issue still unsolved in the latest release?

flamendless avatar Dec 23 '21 10:12 flamendless