Skip to content

Instantly share code, notes, and snippets.

@therocode
Last active August 29, 2015 14:20
Show Gist options
  • Save therocode/da9f45040553f57986b7 to your computer and use it in GitHub Desktop.
Save therocode/da9f45040553f57986b7 to your computer and use it in GitHub Desktop.
GimGui simple element construction
//declare the root variable that can later be used and will
//contain the children
gim::Element root({"root"}, {},
{
gim::Element({"container"}, {}, //first child element
{
gim::Element({"text"}) //grandchild
}),
gim::Element({"container"}, {}, //second child element
{
gim::Element({"text"}), //grandchild
gim::Element({"button"}), //grandchild
gim::Element({"button"}) //grandchild
})
});
//children can also be added after initialisation
gim::Element additionalChild({"extra_child"});
root.append(std::move(additionalChild));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment