Difference between revisions of "SetWindowTitle"

From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 1: Line 1:
<div class="toccolours mw-collapsible mw-collapsed tbl-ds">
+
==setWindowTitle==
<span class="bold">Command History</span>
 
<div class="mw-collapsible-content">
 
<div class="alt-bg">Available since v3.8</div>
 
</div></div>
 
  
 +
<div class="command-min-version-info">Available since: <span class="command-min-version">v3.0</span></div>
  
Allows you to set a custom title in the game application title bar! (window mode only)
+
<div class="command-doc">Sets the window title.</div>
  
 
+
Lua Syntax:
Syntax:
+
<pre class="command-syntax">setWindowTitle(WindowTitle)</pre>
<syntaxhighlight>
+
===Arguments===
setWindowTitle("title")
+
====WindowTitle====
</syntaxhighlight>
+
:'''"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>
-- let's get the current users os language & store it in a variable!
 
 
sysLang = getProperty("system_language")
 
sysLang = getProperty("system_language")
 
-- let's set the window title based on users language!
 
 
if sysLang == "English" then
 
if sysLang == "English" then
setWindowTitle("my new game in english")
+
  setWindowTitle("my demogame")
 
elseif sysLang == "German" then
 
elseif sysLang == "German" then
setWindowTitle("mein neues spiel auf deutsch")
+
  setWindowTitle("mein Demospiel")
 
end
 
end
 
</syntaxhighlight>
 
</syntaxhighlight>
 
 
 
<span class="bold underline">Arguments</span>
 
 
<span class="bold">title</span>: "string" <br/>
 
This should include the text you want to be displayed in the application title bar! (window mode)
 
 
 
<span class="bold underline">Flags</span>
 
 
none
 
 
 
<span class="bold underline">Return</span>
 
 
none
 
{{i18n|SetWindowTitle}}
 

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