Git Product home page Git Product logo

Comments (2)

vchelaru avatar vchelaru commented on May 27, 2024

I think the hardest part of this is a skinning system which allows for the creation of brand new components. I'm not sure how to handle this.

I have thought about it a bit and I think what might be good is to have a section for global variables. For example, a global variable could be referencing a folder for all textures. Then variables could reference global variables in part or in whole.

This would require simple "operations" for variables as well, if the skinning is to be done with different source folders. For example, if an app has two root folders called Skin1 and Skin2, then there would be a global variable called RootSkinFolder and the variable for texture might be:

{global::RootSkinFolder} + Buttons/Button.png

@bjorn thoughts?

from gum.

bjorn avatar bjorn commented on May 27, 2024

@vchelaru The thing about global variables and skin folders seem to have little to do with my request. I'm not talking about applying a global skin to change the look of the UI components. Rather, this request is only about a system where the behavior and the appearance of a component can be separated.

In the simple case, I have a Button component that implements click behavior and related state handling, and in Gum I would be able to instantiate this component multiple times, but specify a different skin on each button instance because buttons rarely look the same everywhere. Because in this case, the appearance of the button is entirely defined by its skin, this use-case is already covered by Gum by simply placing the "skin" instance as a child of the "button" instance. The only downside in this simple case is that the default size of the button is not taken from its skin, so it needs to be set explicitly on the button instance.

The cases that are not currently supported are basically things like scroll areas or windows, or skinnable containers in general. The biggest limitations being the ones I listed above, namely that the skin can't place things both in front and behind the children and that it can't affect the area where the children get placed.

from gum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.