Difference between revisions of "SetWindowTitle"
From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 1: | Line 1: | ||
− | + | ==setWindowTitle== | |
− | |||
− | |||
− | |||
− | |||
+ | <div class="command-min-version-info">Available since: <span class="command-min-version">v3.0</span></div> | ||
− | + | <div class="command-doc">Sets the window title.</div> | |
− | + | Lua Syntax: | |
− | Syntax: | + | <pre class="command-syntax">setWindowTitle(WindowTitle)</pre> |
− | < | + | ===Arguments=== |
− | setWindowTitle( | + | ====WindowTitle==== |
− | </ | + | :'''"string"''' - Title bar name of display window. |
− | + | ===Flags=== | |
− | + | ===Return Values=== | |
− | Example 1: basic set window title command | + | None. |
+ | ===Examples=== | ||
+ | Example 1: basic set window title command | ||
<syntaxhighlight> | <syntaxhighlight> | ||
setWindowTitle("my new game title") | setWindowTitle("my new game title") | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Example 2: set window title based on current users system language | |
− | Example 2: set window title based on current users system language | ||
<syntaxhighlight> | <syntaxhighlight> | ||
− | |||
sysLang = getProperty("system_language") | sysLang = getProperty("system_language") | ||
− | |||
− | |||
if sysLang == "English" then | if sysLang == "English" then | ||
− | + | setWindowTitle("my demogame") | |
elseif sysLang == "German" then | elseif sysLang == "German" then | ||
− | + | setWindowTitle("mein Demospiel") | |
end | end | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 17:12, 22 November 2013
setWindowTitle
Available since: v3.0
Sets the window title.
Lua Syntax:
setWindowTitle(WindowTitle)
Arguments
WindowTitle
- "string" - Title bar name of display window.
Flags
Return Values
None.
Examples
Example 1: basic set window title command
setWindowTitle("my new game title")
Example 2: set window title based on current users system language
sysLang = getProperty("system_language")
if sysLang == "English" then
setWindowTitle("my demogame")
elseif sysLang == "German" then
setWindowTitle("mein Demospiel")
end