Difference between revisions of "Global Command: setWindowTitle"
From The Official Visionaire Studio: Adventure Game Engine Wiki
m |
m |
||
Line 28: | Line 28: | ||
setWindowTitle("my new title in english") | setWindowTitle("my new title in english") | ||
elseif sysLang == "German" then | elseif sysLang == "German" then | ||
− | setWindowTitle("mein | + | setWindowTitle("mein neuer titel in deutsch") |
end | end | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 39: | Line 39: | ||
setWindowTitle("my new title in english") | setWindowTitle("my new title in english") | ||
elseif lang == "German" then | elseif lang == "German" then | ||
− | setWindowTitle("mein | + | setWindowTitle("mein neuer titel in deutsch") |
end | end | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 21:34, 23 March 2014
Function History
Available since v4.0
Allows you to set a custom title in the game application title bar. (only applicable for window mode)
Syntax:
setWindowTitle("title")
Example 1: basic set window title method
setWindowTitle("my new game title")
Example 2: set window title based on current users system language
sysLang = getProperty("system_language") -- store current os language
-- let's set the window title based on os language
if sysLang == "English" then
setWindowTitle("my new title in english")
elseif sysLang == "German" then
setWindowTitle("mein neuer titel in deutsch")
end
Example 3: set window title based on current game language
local lang = game:getLink(VGameCurrentLanguage):getName() -- store current game language
if lang == "English" then
setWindowTitle("my new title in english")
elseif lang == "German" then
setWindowTitle("mein neuer titel in deutsch")
end
Arguments
title: "string"
This should include the text you want to be displayed in the application title bar (window mode)
Flags
none
Return
none