Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple examples #10

Open
belohlavek opened this issue Mar 29, 2020 · 4 comments
Open

Multiple examples #10

belohlavek opened this issue Mar 29, 2020 · 4 comments

Comments

@belohlavek
Copy link

belohlavek commented Mar 29, 2020

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!

@coding-jackalope
Copy link
Collaborator

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.

@belohlavek
Copy link
Author

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
Copy link
Author

belohlavek commented Mar 30, 2020

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...

@flamendless
Copy link
Owner

flamendless commented Dec 23, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants