mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Replace ACTION in texts by {button} placeholders
Gamepads and the Steam Deck need "ACTION" to be replaced by a controller glyph, so that's now possible.
This commit is contained in:
parent
620365614d
commit
09365347b6
6 changed files with 101 additions and 25 deletions
|
@ -213,6 +213,7 @@
|
|||
<string english="Toggle whether you interact with prompts using ENTER or E." translation="" explanation="prompts: see the `Press {button} to talk to .../activate terminal/teleport` below" max="38*3"/>
|
||||
<string english="E" translation="" explanation="keyboard key E. Speedrunner options menu"/>
|
||||
<string english="ENTER" translation="" explanation="keyboard key ENTER. Speedrunner options menu"/>
|
||||
<string english="ACTION" translation="" explanation="the ACTION key is either the SPACE key, Z or V (this is explained on the title screen). It's used in strings like `Press ACTION to advance text`"/>
|
||||
<string english="Interact button: {button}" translation="" explanation="keyboard key (E or ENTER) is filled in for {button}. Speedrunner options menu" max="38*2"/>
|
||||
<string english="fake load screen" translation="" explanation="menu option"/>
|
||||
<string english="Fake Load Screen" translation="" explanation="title, allows the loading screen which counts to 100% to be turned off" max="20"/>
|
||||
|
@ -418,12 +419,15 @@
|
|||
<string english="To install new player levels, copy the .vvvvvv files to the levels folder." translation="" explanation="" max="38*3"/>
|
||||
<string english="Are you sure you want to show the levels path? This may reveal sensitive information if you are streaming." translation="" explanation="" max="38*4"/>
|
||||
<string english="The levels path is:" translation="" explanation="" max="40"/>
|
||||
<string english="[ Press ACTION to Start ]" translation="" explanation="title screen" max="38*2"/>
|
||||
<string english="[ Press ACTION to Start ]" translation="" explanation="***OUTDATED***" max="38*2"/>
|
||||
<string english="[ Press {button} to Start ]" translation="" explanation="title screen. Expect `ACTION`" max="38*2"/>
|
||||
<string english="ACTION = Space, Z, or V" translation="" explanation="title screen" max="38*3"/>
|
||||
<string english="[Press ENTER to return to editor]" translation="" explanation="***OUTDATED***" max="40"/>
|
||||
<string english="[Press {button} to return to editor]" translation="" explanation="`to editor` is sorta redundant" max="40"/>
|
||||
<string english="- Press ACTION to advance text -" translation="" explanation="to dismiss a textbox" max="40"/>
|
||||
<string english="Press ACTION to continue" translation="" explanation="" max="34"/>
|
||||
<string english="- Press ACTION to advance text -" translation="" explanation="***OUTDATED***" max="40"/>
|
||||
<string english="- Press {button} to advance text -" translation="" explanation="to dismiss a textbox. Expect `ACTION`" max="40"/>
|
||||
<string english="Press ACTION to continue" translation="" explanation="***OUTDATED***" max="34"/>
|
||||
<string english="Press {button} to continue" translation="" explanation="Expect `ACTION`" max="34"/>
|
||||
<string english="Current Time" translation="" explanation="super gravitron, stopwatch time" max="20"/>
|
||||
<string english="Best Time" translation="" explanation="super gravitron, best stopwatch time" max="20"/>
|
||||
<string english="Next Trophy at 5 seconds" translation="" explanation="" max="38*2"/>
|
||||
|
@ -449,7 +453,8 @@
|
|||
<string english="[ QUIT ]" translation="" explanation="in-game menu" max="40"/>
|
||||
<string english="[ GRAVITRON ]" translation="" explanation="in-game menu" max="40"/>
|
||||
<string english="NO SIGNAL" translation="" explanation="map screen. So like a TV/computer monitor" max="29"/>
|
||||
<string english="Press ACTION to warp to the ship." translation="" explanation="spaceship. Warp = teleport" max="38*7"/>
|
||||
<string english="Press ACTION to warp to the ship." translation="" explanation="***OUTDATED***" max="38*7"/>
|
||||
<string english="Press {button} to warp to the ship." translation="" explanation="spaceship. Warp = teleport. Expect `ACTION`" max="38*7"/>
|
||||
<string english="Missing..." translation="" case="1" explanation="this male crew member is missing" max="15"/>
|
||||
<string english="Missing..." translation="" case="2" explanation="this female crew member is missing" max="15"/>
|
||||
<string english="Missing..." translation="" case="3" explanation="Viridian is missing (final level). You could even fill in something like `Uh-oh...` here if you really have to specify gender otherwise - everyone else is rescued, but the player is missing" max="15"/>
|
||||
|
@ -463,7 +468,8 @@
|
|||
<string english="ERROR: Could not save game!" translation="" explanation="in-game menu" max="34*2"/>
|
||||
<string english="ERROR: Could not save settings file!" translation="" explanation="" max="38*2"/>
|
||||
<string english="Game saved ok!" translation="" explanation="in-game menu" max="38*2"/>
|
||||
<string english="[Press ACTION to save your game]" translation="" explanation="in-game menu" max="40"/>
|
||||
<string english="[Press ACTION to save your game]" translation="" explanation="***OUTDATED***" max="40"/>
|
||||
<string english="[Press {button} to save your game]" translation="" explanation="in-game menu. Expect `ACTION`" max="40"/>
|
||||
<string english="(Note: The game is autosaved at every teleporter.)" translation="" explanation="in-game menu" max="38*3"/>
|
||||
<string english="Last Save:" translation="" explanation="in-game menu" max="40"/>
|
||||
<string english="Return to main menu?" translation="" explanation="in-game menu" max="38*4"/>
|
||||
|
@ -655,7 +661,8 @@
|
|||
<string english="Game Saved" translation="" explanation="" max="30"/>
|
||||
<string english="Press arrow keys or WASD to move" translation="" explanation="" max="32*2"/>
|
||||
<string english="Press left/right to move" translation="" explanation="" max="32*2"/>
|
||||
<string english="Press ACTION to flip" translation="" explanation="" max="32*3"/>
|
||||
<string english="Press ACTION to flip" translation="" explanation="***OUTDATED***" max="32*3"/>
|
||||
<string english="Press {button} to flip" translation="" explanation="expect `ACTION`" max="32*3"/>
|
||||
<string english="Press ENTER to view map and quicksave" translation="" explanation="***OUTDATED***" max="32*3"/>
|
||||
<string english="Press {button} to view map and quicksave" translation="" explanation="" max="32*3"/>
|
||||
<string english="If you prefer, you can press UP or DOWN instead of ACTION to flip." translation="" explanation="" max="34*3"/>
|
||||
|
|
|
@ -24,7 +24,7 @@ extern "C"
|
|||
typedef enum
|
||||
{
|
||||
//ActionSet_Global,
|
||||
//ActionSet_Menu,
|
||||
ActionSet_Menu,
|
||||
ActionSet_InGame
|
||||
//ActionSet_Editor
|
||||
}
|
||||
|
@ -45,6 +45,13 @@ Action_Global;
|
|||
|
||||
typedef enum
|
||||
{
|
||||
Action_Menu_Accept
|
||||
}
|
||||
Action_Menu;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
Action_InGame_ACTION,
|
||||
Action_InGame_Interact,
|
||||
Action_InGame_Map
|
||||
}
|
||||
|
@ -67,6 +74,7 @@ typedef union
|
|||
{
|
||||
int intval;
|
||||
//Action_Global Global;
|
||||
Action_Menu Menu;
|
||||
Action_InGame InGame;
|
||||
//Action_Editor Editor;
|
||||
}
|
||||
|
|
|
@ -109,9 +109,19 @@ const char* BUTTONGLYPHS_get_button(const ActionSet actionset, const Action acti
|
|||
* to fill into strings like "Press {button} to activate terminal". */
|
||||
switch (actionset)
|
||||
{
|
||||
case ActionSet_Menu:
|
||||
switch (action.Menu)
|
||||
{
|
||||
case Action_Menu_Accept:
|
||||
return loc::gettext("ACTION");
|
||||
}
|
||||
break;
|
||||
case ActionSet_InGame:
|
||||
switch (action.InGame)
|
||||
{
|
||||
case Action_InGame_ACTION:
|
||||
return loc::gettext("ACTION");
|
||||
|
||||
case Action_InGame_Interact:
|
||||
if (game.separate_interact)
|
||||
{
|
||||
|
|
|
@ -715,7 +715,14 @@ void Game::remaining_textbox(void)
|
|||
|
||||
void Game::actionprompt_textbox(void)
|
||||
{
|
||||
graphics.createtextboxflipme(loc::gettext("Press ACTION to continue"), -1, 196, 164, 164, 255);
|
||||
char buffer[SCREEN_WIDTH_CHARS + 1];
|
||||
vformat_buf(
|
||||
buffer, sizeof(buffer),
|
||||
loc::gettext("Press {button} to continue"),
|
||||
"button:but",
|
||||
vformat_button(ActionSet_InGame, Action_InGame_ACTION)
|
||||
);
|
||||
graphics.createtextboxflipme(buffer, -1, 196, 164, 164, 255);
|
||||
graphics.textboxprintflags(PR_FONT_INTERFACE);
|
||||
graphics.textboxpad(1, 1);
|
||||
graphics.textboxcenterx();
|
||||
|
@ -1114,7 +1121,15 @@ void Game::updatestate(void)
|
|||
graphics.textboxremovefast();
|
||||
obj.flags[3] = true;
|
||||
setstate(0);
|
||||
graphics.createtextbox(loc::gettext("Press ACTION to flip"), -1, 25, 174, 174, 174);
|
||||
|
||||
char buffer[SCREEN_WIDTH_CHARS*3 + 1];
|
||||
vformat_buf(
|
||||
buffer, sizeof(buffer),
|
||||
loc::gettext("Press {button} to flip"),
|
||||
"button:but",
|
||||
vformat_button(ActionSet_InGame, Action_InGame_ACTION)
|
||||
);
|
||||
graphics.createtextbox(buffer, -1, 25, 174, 174, 174);
|
||||
graphics.textboxprintflags(PR_FONT_INTERFACE);
|
||||
graphics.textboxwrap(4);
|
||||
graphics.textboxcentertext();
|
||||
|
|
|
@ -768,8 +768,10 @@ static void fill_buttons(char* buffer, const size_t buffer_len, const char* line
|
|||
{
|
||||
vformat_buf(buffer, buffer_len,
|
||||
line,
|
||||
"b_act:but,"
|
||||
"b_int:but,"
|
||||
"b_map:but",
|
||||
vformat_button(ActionSet_InGame, Action_InGame_ACTION),
|
||||
vformat_button(ActionSet_InGame, Action_InGame_Interact),
|
||||
vformat_button(ActionSet_InGame, Action_InGame_Map)
|
||||
);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <SDL.h>
|
||||
|
||||
#include "ActionSets.h"
|
||||
#include "ButtonGlyphs.h"
|
||||
#include "Constants.h"
|
||||
#include "Credits.h"
|
||||
#include "CustomLevels.h"
|
||||
|
@ -1623,8 +1624,18 @@ void titlerender(void)
|
|||
font::print(PR_RIGHT, 264, temp+35, loc::gettext("MAKE AND PLAY EDITION"), tr, tg, tb);
|
||||
#endif
|
||||
|
||||
font::print_wrap(PR_CEN, -1, 175, loc::gettext("[ Press ACTION to Start ]"), tr, tg, tb);
|
||||
font::print_wrap(PR_CEN, -1, 195, loc::gettext("ACTION = Space, Z, or V"), int(tr*0.5f), int(tg*0.5f), int(tb*0.5f));
|
||||
char buffer[SCREEN_WIDTH_CHARS*2 + 1];
|
||||
vformat_buf(
|
||||
buffer, sizeof(buffer),
|
||||
loc::gettext("[ Press {button} to Start ]"),
|
||||
"button:but",
|
||||
vformat_button(ActionSet_Menu, Action_Menu_Accept)
|
||||
);
|
||||
font::print_wrap(PR_CEN, -1, 175, buffer, tr, tg, tb);
|
||||
if (BUTTONGLYPHS_keyboard_is_active())
|
||||
{
|
||||
font::print_wrap(PR_CEN, -1, 195, loc::gettext("ACTION = Space, Z, or V"), int(tr*0.5f), int(tg*0.5f), int(tb*0.5f));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1975,13 +1986,17 @@ void gamerender(void)
|
|||
|
||||
graphics.copy_texture(graphics.gameplayTexture, NULL, NULL);
|
||||
|
||||
if (graphics.flipmode)
|
||||
if (game.advancetext)
|
||||
{
|
||||
if (game.advancetext) font::print(PR_CEN | PR_BOR, -1, 228, loc::gettext("- Press ACTION to advance text -"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (game.advancetext) font::print(PR_CEN | PR_BOR, -1, 5, loc::gettext("- Press ACTION to advance text -"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2));
|
||||
char buffer_adv[SCREEN_WIDTH_CHARS + 1];
|
||||
vformat_buf(
|
||||
buffer_adv, sizeof(buffer_adv),
|
||||
loc::gettext("- Press {button} to advance text -"),
|
||||
"button:but",
|
||||
vformat_button(ActionSet_InGame, Action_InGame_ACTION)
|
||||
);
|
||||
|
||||
font::print(PR_CEN | PR_BOR, -1, graphics.flipmode ? 228 : 5, buffer_adv, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2));
|
||||
}
|
||||
|
||||
if (game.readytotele > 100 || game.oldreadytotele > 100)
|
||||
|
@ -2593,7 +2608,14 @@ void maprender(void)
|
|||
}
|
||||
else if (obj.flags[67] && !map.custommode)
|
||||
{
|
||||
font::print_wrap(PR_CEN, -1, 105, loc::gettext("Press ACTION to warp to the ship."), 196, 196, 255 - help.glow);
|
||||
char buffer[SCREEN_WIDTH_CHARS + 1];
|
||||
vformat_buf(
|
||||
buffer, sizeof(buffer),
|
||||
loc::gettext("Press {button} to warp to the ship."),
|
||||
"button:but",
|
||||
vformat_button(ActionSet_InGame, Action_InGame_ACTION)
|
||||
);
|
||||
font::print_wrap(PR_CEN, -1, 105, buffer, 196, 196, 255 - help.glow);
|
||||
}
|
||||
#if !defined(NO_CUSTOM_LEVELS)
|
||||
else if(map.custommode){
|
||||
|
@ -2755,7 +2777,15 @@ void maprender(void)
|
|||
|
||||
if (!game.gamesaved)
|
||||
{
|
||||
font::print(PR_CEN, -1, 80, loc::gettext("[Press ACTION to save your game]"), 255 - help.glow*2, 255 - help.glow*2, 255 - help.glow);
|
||||
char buffer[SCREEN_WIDTH_CHARS + 1];
|
||||
vformat_buf(
|
||||
buffer, sizeof(buffer),
|
||||
loc::gettext("[Press {button} to save your game]"),
|
||||
"button:but",
|
||||
vformat_button(ActionSet_InGame, Action_InGame_ACTION)
|
||||
);
|
||||
|
||||
font::print(PR_CEN, -1, 80, buffer, 255 - help.glow*2, 255 - help.glow*2, 255 - help.glow);
|
||||
|
||||
if (map.custommode || game.quicksummary == "")
|
||||
{
|
||||
|
@ -2991,13 +3021,17 @@ void teleporterrender(void)
|
|||
|
||||
graphics.drawgui();
|
||||
|
||||
if (graphics.flipmode)
|
||||
if (game.advancetext)
|
||||
{
|
||||
if (game.advancetext) font::print(PR_CEN | PR_BOR, -1, 228, loc::gettext("- Press ACTION to advance text -"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (game.advancetext) font::print(PR_CEN | PR_BOR, -1, 5, loc::gettext("- Press ACTION to advance text -"), 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2));
|
||||
char buffer_adv[SCREEN_WIDTH_CHARS + 1];
|
||||
vformat_buf(
|
||||
buffer_adv, sizeof(buffer_adv),
|
||||
loc::gettext("- Press {button} to advance text -"),
|
||||
"button:but",
|
||||
vformat_button(ActionSet_InGame, Action_InGame_ACTION)
|
||||
);
|
||||
|
||||
font::print(PR_CEN | PR_BOR, -1, graphics.flipmode ? 228 : 5, buffer_adv, 220 - (help.glow), 220 - (help.glow), 255 - (help.glow / 2));
|
||||
}
|
||||
|
||||
graphics.set_render_target(graphics.gameTexture);
|
||||
|
|
Loading…
Reference in a new issue