docs: update nwn-2-gui-scripting
This commit is contained in:
parent
73c059e499
commit
5a86c84b06
@ -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:
|
||||
---
|
||||
|
||||
<!-- TITLE: Nwn 2 Gui Scripting -->
|
||||
<!-- SUBTITLE: A quick summary of Nwn 2 Gui Scripting -->
|
||||
|
||||
|
||||
# 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 `<?xml version="1.0" encoding="utf-8"?>`
|
||||
- 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 `<UIText />`
|
||||
- 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
|
||||
|
Loading…
Reference in New Issue
Block a user