Index: binaries/data/mods/mod/gui/gui.rnc =================================================================== --- binaries/data/mods/mod/gui/gui.rnc +++ binaries/data/mods/mod/gui/gui.rnc @@ -116,7 +116,7 @@ ## # Objects # ## -objects = element objects { (script | object)* } +objects = element objects { (script | object | component)* } script = element script { text & @@ -139,6 +139,11 @@ base_settings, ex_settings } +component = + element component { + class, + ((attribute * - (class))*) + } action = element action { text, Index: binaries/data/mods/mod/gui/gui.rng =================================================================== --- binaries/data/mods/mod/gui/gui.rng +++ binaries/data/mods/mod/gui/gui.rng @@ -8,6 +8,7 @@ --> + @@ -461,6 +462,7 @@ + @@ -483,6 +485,7 @@ + @@ -501,6 +504,25 @@ + + + + + + + + + + + class + + + + + + + + Index: binaries/data/mods/public/gui/session/developer_overlay/DeveloperOverlay.js =================================================================== --- binaries/data/mods/public/gui/session/developer_overlay/DeveloperOverlay.js +++ binaries/data/mods/public/gui/session/developer_overlay/DeveloperOverlay.js @@ -1,45 +1,48 @@ /** - * This class stores the checkboxes that are part of the developer overlay. - * These checkboxes may own their own helper class instances, such as the EntityState or TimeWarp feature. + * Developer overlay - Various useful debug commands. */ -class DeveloperOverlay +class DeveloperOverlay extends Component { - constructor(playerViewControl, selection) + static initXML(parent, attrs) { - this.devCommandsOverlay = Engine.GetGUIObjectByName("devCommandsOverlay"); - this.devCommandsOverlay.onPress = this.toggle.bind(this); + return `