Search the Community
Showing results for tags 'adding button to window'.
-
Hi (for Dad72 or anyone with Castor skills) I'm using Castor for simple UI elements for my app. My UI will have a window for scene/world buttons, a window for current mesh buttons and a window for status/MI. I am having difficulty adding buttons into a window: var form = new CASTORGUI.GUIWindow("form", { x: 0, y: 0, w: 300, h: 200, overflow: "hidden" }, guiSystem); var sceneButton_toggleAxis = new CASTORGUI.GUIButton("sceneButton_toggleAxis", { x:10, y: 10, w:40, h:40, borderRadiusButton:"20px", borderButton:"8px solid gray", value:" ", backgroundImage:"./assets/icon_axis.png" }, guiSystem, toggleSceneAxis); form.add(sceneButton_toggleAxis); form.setVisible(true) When I run this it appears correct. However if I move the window to a new position there is an instance of the button in the window AND a duplicate instance of the button left behind in its original position. Both buttons appear functional. How can I avoid this duplicate button being created? Second question - is it possible to remove the title border from the window object or reposition it (e.g. to the bottom of the window). Many thanks Richard
- 7 replies
-
- adding button to window
- castorgui
-
(and 1 more)
Tagged with: