Skip to content

Instantly share code, notes, and snippets.

@Victorious3
Created February 3, 2015 11:23
Show Gist options
  • Save Victorious3/bfc85a185e66bcaee51d to your computer and use it in GitHub Desktop.
Save Victorious3/bfc85a185e66bcaee51d to your computer and use it in GitHub Desktop.
GUI builder concept
Gui gui = GuiBuilderXML.of(
"<div width = 200, height = 150, align = 'center'>" +
"<p align = 'left:10%'>I'm a paragraph!</p>" +
"<button align = 'center' id = 'button1', text = 'I\'m some text on a button!'/>" +
"</div>"
);
gui.getElement("button1").addEventListener((e) -> {
doStuffOnTheServerSide();
}, ActionEvent.class, Side.SERVER);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment