1,554
edits
(More on evaluation precedence) |
(Move sections precendence into evaluation precedence) |
||
Line 13: | Line 13: | ||
* [640xY] -- could be used for 640x400 and 640x480 | * [640xY] -- could be used for 640x400 and 640x480 | ||
* [640x480] -- could be used for 640x480 only | * [640x480] -- could be used for 640x480 only | ||
=== Expressions === | === Expressions === | ||
Line 152: | Line 138: | ||
== Evaluation precedence == | == Evaluation precedence == | ||
Within one section everything is computed left to right down to top. No forward references are allowed. Only exception is aliases which can refer to not yet defined variables and widget properties, but at time of useage those variables should be defined, otherwise you will get an error. | |||
Currently any error in evaluation will lead to error() and ScummVM will be closed. So be careful, especially with built-in theme. | Currently any error in evaluation will lead to error() and ScummVM will be closed. So be careful, especially with built-in theme. | ||
On each resolution change all user-defined variables and aliases get cleared and all sections get recomputed. When sections get loaded for a single resolution, all of them are kept, so you can specify a generic [XxY] scheme and then overwrite only some widgets, thus simplifying whole thing. | On each resolution change all user-defined variables and aliases get cleared and all sections get recomputed. When sections get loaded for a single resolution, all of them are kept, so you can specify a generic [XxY] scheme and then overwrite only some widgets, thus simplifying whole thing. | ||
Sections loading order is always the same. For resolution 640x480 it is: | |||
# Built-in theme | |||
## [XxY] | |||
## [640xY] | |||
## [640x480] | |||
# Custom theme | |||
## [XxY] | |||
## [640xY] | |||
## [640x480] | |||
Only present sections are loaded. If section is not defined, no error message is generated | |||
== Widget name conventions == | == Widget name conventions == |