Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Created August 5, 2018 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flushpot1125/2b069d412e021ce6ec44a7eec0dbfa8a to your computer and use it in GitHub Desktop.
Save flushpot1125/2b069d412e021ce6ec44a7eec0dbfa8a to your computer and use it in GitHub Desktop.
var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");
var button1 = BABYLON.GUI.Button.CreateSimpleButton("but1", "Click Me");
button1.width = "150px"
button1.height = "40px";
button1.color = "white";
button1.cornerRadius = 20;
button1.background = "green";
button1.onPointerUpObservable.add(function() {
pushedFlag=true;
});
advancedTexture.addControl(button1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment