Skip to content

Refactoring for automated creation of Gui elements #10

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

brinoausrino
Copy link

Hello Gal,

first, thank you for this addon! I'm using it extensivly to create GUIs for my multitouch applications.

Some months ago I started to need some more flexibility, so I refactored some parts of ofxInterface. I'm not sure if you want to apply this kind of major changes but I'll give it a try. To sum up what changed:

Creation of Nodes from json file:

  • the GuiFactory reads in a json and creates a scene out of it
  • therefore nodes can be setuped with a struct that contains the nodes properties
  • GuiFactory creates this struct by parsing the json and creating nodes automatically
  • some base components like buttons and keyboard have been added
  • for own non-basic components you can subclass GuiFactory and register other elements
  • since some components require textures or fonts I decided to use ofxFontStash2 as font renderer and ofxAssetManager to manage textures and fonts, so this maybe a drawback since this two addons are now mandatory to compile ofxInterface

Lambda functions

  • I moved the Touch-lambda functions from LambdaView to Node since they are very useful ;)

Render changes

  • added a pre and post-draw function to have more flexibility while rendering (shader etc.)
  • added a group render function, to enable a photoshop like layer system (I release that in another addon)

Export scene

  • not yet completed but planned: export scene to json file

What do you think?

Best
Brian

- NodeSettings struct to setup Node from
- lambda functions for Touch took from lambda node
- json export node properties
- pre and postDraw functions for more variablity in drawing
- group render functionality
@moebiussurfing
Copy link

hey @brinoausrino ,
thanks for sharing this.
your bundled examples look really helpful.

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

Successfully merging this pull request may close these issues.

2 participants