#include <guiProfileTheme_ScriptBinding.h>
Inherits SimObject.
|
| String | adjustValue (color, percent) |
| Integer | createBorder (name) |
| Integer | createCursor (category, [name]) |
| Integer | createProfile (category, [name]) |
| Integer | getBorder (category) |
| String | getBorderCategoryNames () |
| String | getCategoryNames () |
| Integer | getCursor (category) |
| String | getCursorCanonicalName (category) |
| String | getCursorCategoryNames () |
| String | getCursors (category) |
| String | getCursorStockFile (category) |
| Integer | getProfile (category) |
| Integer | getProfileCount () |
| String | getProfiles (category) |
| Boolean | isFieldOverridden (member, fieldName) |
| Boolean | removeBorder (border) |
| Boolean | removeCursor (cursor) |
| Boolean | removeProfile (profile) |
| Boolean | renameTheme (newName) |
| void | resetField (member, fieldName) |
| void | resetProfile (member) |
| void | restamp () |
| String | setAlpha (color, alpha) |
| void | assignFieldsFrom (SimObject) |
| Integer | clone ([copyDynamicFields=false]?) |
| Integer | deepClone () |
| void | delete () |
| Integer | getId () |
| void | setName (newName) |
| String | getName () |
| String | getClassNamespace () |
| String | getSuperClassNamespace () |
| void | setClassNamespace (nameSpace) |
| void | setSuperClassNamespace () |
| Boolean | isMethod (string methodName) |
| String | call (methodName, [args] *) |
| void | dumpClassHierarchy () |
| void | dump () |
| Boolean | isMemberOfClass (string classname) |
| String | getClassName () |
| String | getFieldValue (fieldName) |
| Boolean | setFieldValue (fieldName, value) |
| Boolean | setEditFieldValue (fieldName, value) |
| Integer | getDynamicFieldCount () |
| String | getDynamicField (index) |
| Integer | getFieldCount () |
| String | getField (int index) |
| void | setProgenitorFile (file) |
| String | getProgenitorFile () |
| Integer | getType () |
| String | getFieldType (fieldName) |
| void | setInternalName (string InternalName) |
| String | getInternalName () |
| Boolean | isChildOfGroup (groupID) |
| Integer | getGroup () |
| Boolean | startTimer (callbackFunction, float timePeriod, [repeat]?) |
| void | stopTimer () |
| Boolean | isTimerActive () |
| Integer | schedule (time, command, [arg] *) |
| void | startListening (SimObject) |
| void | stopListening (SimObject) |
| void | addListener (SimObject) |
| void | removeListener (SimObject) |
| void | removeAllListeners () |
| void | postEvent (String eventName, String data) |
| Boolean | save (fileName, [selectedOnly]?) |
| void | addFieldFilter (fieldName) |
| void | removeFieldFilter (fieldName) |
◆ adjustValue()
| String adjustValue |
( |
color | , |
|
|
percent | ) |
Shifts a color's brightness by a percentage, preserving hue and alpha. Positive percentages brighten, negative darken.
- Parameters
-
| color | The color as "red green blue alpha". |
| percent | The brightness shift in percentage points. |
- Returns
- The adjusted color as "red green blue alpha".
◆ createBorder()
Creates a single-use custom border owned by the theme. A custom border is not a category member: it keeps its own field values and never appears in getBorderCategoryNames. Used by the Profile Editor's per-side "Custom..." flow, named e.g. <ProfileName><Slot>CustomBorder.
- Parameters
-
| name | The object name for the new border. |
- Returns
- The new GuiBorderProfile id, or 0 on failure.
◆ createCursor()
Creates an extra member cursor in a category, alongside the default. A category holding more than one cursor is what makes the Gui Editor offer a choice on a control's cursor slot.
- Parameters
-
| category | The cursor category name (see getCursorCategoryNames). |
| name | Optional object name; defaults to <ThemeName><Suffix><N>. |
- Returns
- The new GuiCursor id, or 0 on failure.
◆ createProfile()
Creates an extra member profile in a category, alongside the default.
- Parameters
-
| category | The category name (see getCategoryNames). |
| name | Optional object name; defaults to <ThemeName><Suffix><N>. |
- Returns
- The new GuiControlProfile id, or 0 on failure.
◆ getBorder()
Gets the member border profile for a border category.
- Parameters
-
| category | The border category name (see getBorderCategoryNames). |
- Returns
- The GuiBorderProfile id, or 0 if the category is unknown.
◆ getBorderCategoryNames()
| String getBorderCategoryNames |
( |
| ) |
|
Gets the engine-defined border category names.
- Returns
- A space-separated list of border category names.
◆ getCategoryNames()
Gets the engine-defined profile category names.
- Returns
- A space-separated list of category names.
◆ getCursor()
Gets the default member cursor for a cursor category.
- Parameters
-
| category | The cursor category name (see getCursorCategoryNames). |
- Returns
- The GuiCursor id, or 0 if the category is unknown.
◆ getCursorCanonicalName()
| String getCursorCanonicalName |
( |
category | | ) |
|
Gets the name the engine falls back to for a cursor category ("EditCursor"). Installing a theme's cursors means registering copies of them under these names; see AppCore::installThemeCursors.
- Parameters
-
| category | The cursor category name (see getCursorCategoryNames). |
- Returns
- The canonical cursor name, or "" if the category is unknown.
◆ getCursorCategoryNames()
| String getCursorCategoryNames |
( |
| ) |
|
Gets the engine-defined cursor category names. The suffixes these produce are also the canonical cursor names the engine falls back to when a control names no cursor of its own.
- Returns
- A space-separated list of cursor category names.
◆ getCursors()
| String getCursors |
( |
category | | ) |
|
Gets all member cursors for a category: the default first, then extras. This is how a game picks between several cursors a theme offers for the same job - Canvas.setCursor(getWord(theme.getCursors("Default"), 1)).
- Parameters
-
| category | The cursor category name (see getCursorCategoryNames). |
- Returns
- A space-separated list of GuiCursor ids.
◆ getCursorStockFile()
| String getCursorStockFile |
( |
category | | ) |
|
Gets the stock art file name a cursor category starts from ("defaultCursor.png"). The editor asks so it can seed a theme's own cursor folder; a theme never copies files itself.
- Parameters
-
| category | The cursor category name (see getCursorCategoryNames). |
- Returns
- The stock file name, or "" if the category is unknown.
◆ getProfile()
Gets the default member profile for a category.
- Parameters
-
| category | The category name (see getCategoryNames). |
- Returns
- The GuiControlProfile id, or 0 if the category is unknown.
◆ getProfileCount()
Gets the number of member profiles in the theme (defaults plus extras).
- Returns
- The member profile count.
◆ getProfiles()
| String getProfiles |
( |
category | | ) |
|
Gets all member profiles for a category: the default first, then extras.
- Parameters
-
| category | The category name (see getCategoryNames). |
- Returns
- A space-separated list of GuiControlProfile ids.
◆ isFieldOverridden()
| Boolean isFieldOverridden |
( |
member | , |
|
|
fieldName | ) |
Checks whether a member has overridden a field away from the theme.
- Parameters
-
| member | The member profile or border profile. |
| fieldName | The field to check. |
- Returns
- True if the field is overridden.
◆ removeBorder()
Removes a custom border created with createBorder.
- Parameters
-
| border | The custom border to remove. |
- Returns
- True if the border was a custom border owned by this theme and was removed.
◆ removeCursor()
Removes an extra member cursor. Default members are refused: a theme always provides one cursor per category.
- Parameters
-
| cursor | The extra cursor to remove. |
- Returns
- True if the cursor was an extra and was removed.
◆ removeProfile()
Removes an extra member profile. Default members are refused: a theme always provides one profile per category.
- Parameters
-
| profile | The extra profile to remove. |
- Returns
- True if the profile was an extra and was removed.
◆ renameTheme()
Renames the theme and every member following the theme-name pattern, updating overridden border references that point at this theme's borders. All-or-nothing: any name collision refuses the whole rename.
- Parameters
-
| newName | The new theme name. |
- Returns
- True if the rename was applied.
◆ resetField()
| void resetField |
( |
member | , |
|
|
fieldName | ) |
Clears a member's override on one field, so the field re-derives from the theme. Accepts a member profile, border profile or cursor.
- Parameters
-
| member | The member profile or border profile. |
| fieldName | The field to reset. |
- Returns
- No return value.
◆ resetProfile()
| void resetProfile |
( |
member | | ) |
|
Clears all of a member's overrides, so every field re-derives from the theme. Accepts a member profile or border profile.
- Parameters
-
| member | The member profile or border profile. |
- Returns
- No return value.
◆ restamp()
Recreates any missing default members and re-derives every non-overridden member field from the current theme values.
- Returns
- No return value.
◆ setAlpha()
| String setAlpha |
( |
color | , |
|
|
alpha | ) |
Replaces a color's alpha, clamping to 0..255.
- Parameters
-
| color | The color as "red green blue alpha". |
| alpha | The new alpha value. |
- Returns
- The color with the new alpha as "red green blue alpha".