mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-02-01 02:34:41 +03:00
Add setfont scripting command
The <font> in the level file is basically the starting font, but it can be changed at any time via scripting.
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
7db0e73109
commit
cc6b00a711
@@ -2424,6 +2424,19 @@ void scriptclass::run(void)
|
||||
position--;
|
||||
}
|
||||
}
|
||||
else if (words[0] == "setfont")
|
||||
{
|
||||
#ifndef NO_CUSTOM_LEVELS
|
||||
if (words[1] == "")
|
||||
{
|
||||
font::set_custom_font(cl.level_font_name.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
font::set_custom_font(words[1].c_str());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
position++;
|
||||
}
|
||||
@@ -3433,6 +3446,9 @@ bool scriptclass::loadcustom(const std::string& t)
|
||||
}else if(words[0] == "loadtext"){
|
||||
if(customtextmode==1){ add("endtext"); customtextmode=0;}
|
||||
add(lines[i]);
|
||||
}else if(words[0] == "setfont"){
|
||||
if(customtextmode==1){ add("endtext"); customtextmode=0;}
|
||||
add(lines[i]);
|
||||
}else if(words[0] == "destroy"){
|
||||
if(customtextmode==1){ add("endtext"); customtextmode=0;}
|
||||
add(lines[i]);
|
||||
|
||||
Reference in New Issue
Block a user