From 5a86c84b0652dcb355de11d7d87bbebc10e49a15 Mon Sep 17 00:00:00 2001 From: "Thibaut CHARLES (Crom)" Date: Fri, 10 Jan 2020 23:05:35 +0000 Subject: [PATCH] docs: update nwn-2-gui-scripting --- nwn-2-gui-scripting.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/nwn-2-gui-scripting.md b/nwn-2-gui-scripting.md index 994e025..75ea90d 100644 --- a/nwn-2-gui-scripting.md +++ b/nwn-2-gui-scripting.md @@ -2,24 +2,28 @@ title: Nwn 2 Gui Scripting description: A quick summary of Nwn 2 Gui Scripting published: 1 -date: 2020-01-10T15:53:14.197Z +date: 2020-01-10T23:05:32.063Z tags: --- + + + + # Resources - [oeiprogrammer](https://oeiprogrammer.blogspot.fr) # Language -The GUI are written in a superset of the standard XML. +The GUI are written in a non standard form of XML. - The first line must be something like `` - Attributes values can be delimited by `'`, `"` or if not delemited ends with a space + Example: this does not work: `OnLeftClick=UIObject_Misc_ExecuteServerScript("gui_myscript","Hello World")` because OnLeftClick value has no delimiter and will end after `Hello` - Auto-closing tags are accepted `` - If you repeat an attribute twice inside the same XML tag, the GUI will not load -- The `UIScene` tag can be left unclosed +- The `UIScene` tag must never be closed # Rules @@ -331,14 +335,14 @@ Inherits from UIPane element. UIButtons can contain multiple UIFrame children with the special `state` attribute, that controls when to display the UIFrame: - `base`: Always displayed (ie: a background image) - `disabled`: when the button is disabled (`disabled="true"`) -- `up`: When the button is not pressed/selected -- `down`: when the button is pressed/selected -- `focused`: When the player has the focus on the button -- `hilited`: _need info_ -- `hifocus`: _need info_ -- `header`: _need info_ related to `UICollapsable` -- `hiheader`: _need info_ related to `UICollapsable` -- `downheader`: _need info_ related to `UICollapsable` +- `up`: When the button is not pressed/selected (`UICollapsable` was opened and has just been closed) +- `down`: when the button is being pressed or is selected (`UICollapsable` is collapsed and will be opened) +- `focused`: When the player has the focus on the button (`UICollapsable` is collapsed) +- `hilited`: when the button is being hovered (`UICollapsable` is collapsed) +- `hifocus`: when the button has the focus **and** is being hovered (`UICollapsable` is collapsed) +- `header`: Only usable when the `UIButton` is inside a `UICollapsable`: when the `UICollapsable` is open +- `hiheader`: Only usable when the `UIButton` is inside a `UICollapsable`: when button is being hovered while the `UICollapsable` is open +- `downheader`: Only usable when the `UIButton` is inside a `UICollapsable`: when button is being pressed while the `UICollapsable` is close You can find examples of this inside `stylesheet.xml`. ### Notes