View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006028 | The Dark Mod | Coding | public | 30.07.2022 11:40 | 30.07.2022 18:14 |
Reporter | stgatilov | Assigned To | stgatilov | ||
Priority | normal | Severity | normal | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Product Version | TDM 2.10 | ||||
Target Version | TDM 2.11 | Fixed in Version | TDM 2.11 | ||
Summary | 0006028: GUI: support expressions on right side of Set command | ||||
Description | GUI scripts support writing expressions with rudimentary math. These expressions are stored inside window, attached to "registers", and evaluated regularly (every frame probably). However, these expressions are allowed only in two places: 1) In register definitions: visible 1 - "gui::invisible" 2) In "if" conditions in script: if ("gui::invisible" == 0) { ... } It would be great to support expressions also on the right side of Set command inside script: set "gui::ObjStartIdx" ("gui::ObjStartIdx" - 1); Then we can easily implement scrolling completely in GUI, without the need for messy integrations between C++ and GUI code. UPDATE: the syntax for vectors is: set backcolor (backcolor[0], backcolor[1], backcolor[2], 1 - backcolor[3]); I.e. separate components by comma as usual, then enclose whole thing in parentheses. | ||||
Additional Information | Original discussion here: https://forums.thedarkmod.com/index.php?/topic/20526-gui-refactoring/&do=findComment&comment=477179 | ||||
Tags | No tags attached. | ||||
Found a terrible issue with using vector components in expressions. While it is not in scope of this feature request, it makes expressions with vectors totally unusable. r10049 Fixed awful bug in getting component of vector in GUI script. This is pretty major global change: r10050 Don't disable referenced register + major refactoring of GetWinVarByName. Previously if you mention a register anywhere in expressions or script, then its automatic updates were disabled forever (since the very startup). Now register auto-update is stopped only after you assign something into it with "set" script command. And the actual implementation: r10051 Wrapped attaching variable to register into idRegister::SetVar method. r10052 Refactored idRegisterList::AddReg, adding another variant. r10053 Supported expressions on right side of "Set" command in GUI scripts. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
30.07.2022 11:40 | stgatilov | New Issue | |
30.07.2022 11:40 | stgatilov | Status | new => assigned |
30.07.2022 11:40 | stgatilov | Assigned To | => stgatilov |
30.07.2022 11:40 | stgatilov | Additional Information Updated | |
30.07.2022 11:41 | stgatilov | Relationship added | related to 0005852 |
30.07.2022 18:09 | stgatilov | Note Added: 0015095 | |
30.07.2022 18:09 | stgatilov | Status | assigned => resolved |
30.07.2022 18:09 | stgatilov | Resolution | open => fixed |
30.07.2022 18:09 | stgatilov | Fixed in Version | => TDM 2.11 |
30.07.2022 18:14 | stgatilov | Description Updated |