Global Command: setWindowTitle

From The Official Visionaire Studio: Adventure Game Engine Wiki
Revision as of 21:30, 23 March 2014 by AFRLme (talk)

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 neue titel auf 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 neue titel auf 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