Last active
August 29, 2015 14:20
-
-
Save therocode/da9f45040553f57986b7 to your computer and use it in GitHub Desktop.
GimGui simple element construction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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