Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making BFG's VR menus translatable #8

Open
wants to merge 1 commit into
base: without-dualwelding
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions neo/d3xp/menus/MenuScreen_Shell_Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ void idMenuScreen_Shell_Settings::Initialize( idMenuHandler* data )
menuOptions.Append( option );
option.Clear();

// Koz add vr options
option.Append( "VR Options" ); // Koz fixme VR options use dictionary strings instead of hard coding.
menuOptions.Append(option);
option.Clear();
// Koz add vr options
option.Append( "#str_swf_vr_vroptionstitle" ); // VR Options
menuOptions.Append(option);
option.Clear();

if( renderSystem->IsStereoScopicRenderingSupported() && !game->isVR ) // Koz - dont allow the user to modify 3d settings inside a VR game.
{
Expand All @@ -92,7 +92,7 @@ void idMenuScreen_Shell_Settings::Initialize( idMenuHandler* data )
helpWidget->SetSpritePath( GetSpritePath(), "info", "helpTooltip" );
AddChild( helpWidget );

const char* tips[] = { "#str_02166", "#str_02168", "#str_02170", "Customize VR settings.", "#str_swf_customize_3d" }; // Koz fixme add vr menus use dictionary.
const char* tips[] = { "#str_02166", "#str_02168", "#str_02170", "#str_swf_vr_vroptionsdesc", "#str_swf_customize_3d" }; // New hint for VR

while( options->GetChildren().Num() < NUM_SETTING_OPTIONS )
{
Expand Down Expand Up @@ -259,11 +259,11 @@ bool idMenuScreen_Shell_Settings::HandleAction( idWidgetAction& action, const id
menuData->SetNextScreen( SHELL_AREA_SYSTEM_OPTIONS, MENU_TRANSITION_SIMPLE );
break;
}
case SETTING_CMD_VR: // Koz add vr menus
{
menuData->SetNextScreen( SHELL_AREA_VR_SETTINGS, MENU_TRANSITION_SIMPLE );
break;
}
case SETTING_CMD_VR: // Koz add vr menus
{
menuData->SetNextScreen( SHELL_AREA_VR_SETTINGS, MENU_TRANSITION_SIMPLE );
break;
}
case SETTING_CMD_3D:
{
menuData->SetNextScreen( SHELL_AREA_STEREOSCOPICS, MENU_TRANSITION_SIMPLE );
Expand Down
4 changes: 2 additions & 2 deletions neo/d3xp/menus/MenuScreen_Shell_Singleplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void idMenuScreen_Shell_Singleplayer::ShowScreen( const mainMenuTransition_t tra
option.Append( "#str_01867" ); // load game
menuOptions.Append( option );
option.Clear();
option.Append("Flicksync"); // flicksync
option.Append( "#str_swf_vr_flcksync_head" ); // flicksync
menuOptions.Append(option);

int index = 0;
Expand Down Expand Up @@ -197,7 +197,7 @@ void idMenuScreen_Shell_Singleplayer::ShowScreen( const mainMenuTransition_t tra
option.Append( "#str_01867" ); // load game
menuOptions.Append( option );
option.Clear();
option.Append("Flicksync"); // flicksync
option.Append( "#str_swf_vr_flcksync_head" ); // flicksync
menuOptions.Append(option);

if( options != NULL )
Expand Down
46 changes: 23 additions & 23 deletions neo/d3xp/menus/MenuScreen_Shell_VR_Character_Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void idMenuScreen_Shell_VR_Character_Options::Initialize( idMenuHandler * data )

btnBack = new (TAG_SWF) idMenuWidget_Button();
btnBack->Initialize( data );
btnBack->SetLabel( "VR Options" );
btnBack->SetLabel( "#str_swf_vr_vroptionstitle" ); // VR Options
btnBack->SetSpritePath( GetSpritePath(), "info", "btnBack" );
btnBack->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_GO_BACK );

Expand All @@ -69,55 +69,55 @@ void idMenuScreen_Shell_VR_Character_Options::Initialize( idMenuHandler * data )

control = new (TAG_SWF) idMenuWidget_ControlButton();
control->SetOptionType( OPTION_SLIDER_TEXT );
control->SetLabel( "Body Mode" );
control->SetLabel( "#str_swf_vr_character_bodymode" );
control->SetDataSource( &systemData, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_BODY_MODE );
control->SetupEvents( DEFAULT_REPEAT_TIME, options->GetChildren().Num() );
control->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_BODY_MODE );
options->AddChild( control );

control = new (TAG_SWF)idMenuWidget_ControlButton();
control->SetOptionType( OPTION_SLIDER_TEXT );
control->SetLabel( "Flashlight Mount" );
control->SetLabel( "#str_swf_vr_character_flashmnt" );
control->SetDataSource( &systemData, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_FLASH_MODE );
control->SetupEvents( DEFAULT_REPEAT_TIME, options->GetChildren().Num() );
control->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_FLASH_MODE );
options->AddChild( control );

control = new (TAG_SWF)idMenuWidget_ControlButton();
control->SetOptionType( OPTION_SLIDER_TEXT );
control->SetLabel( "Weapon Hand" );
control->SetLabel( "#str_swf_vr_character_weaphand" );
control->SetDataSource( &systemData, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_WEAPON_HAND );
control->SetupEvents( DEFAULT_REPEAT_TIME, options->GetChildren().Num() );
control->AddEventAction( WIDGET_EVENT_PRESS ).Set( WIDGET_ACTION_COMMAND, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_WEAPON_HAND );
options->AddChild( control );

control = new (TAG_SWF)idMenuWidget_ControlButton();
control->SetOptionType(OPTION_SLIDER_TEXT);
control->SetLabel("Holster Slots");
control->SetLabel("#str_swf_vr_character_holsterslots");
control->SetDataSource(&systemData, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_HOLSTER_SLOTS);
control->SetupEvents(DEFAULT_REPEAT_TIME, options->GetChildren().Num());
control->AddEventAction(WIDGET_EVENT_PRESS).Set(WIDGET_ACTION_COMMAND, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_HOLSTER_SLOTS);
options->AddChild(control);

control = new (TAG_SWF)idMenuWidget_ControlButton();
control->SetOptionType( OPTION_SLIDER_TEXT );
control->SetLabel( "Use Height" );
control->SetLabel( "#str_swf_vr_character_useheght" );
control->SetDataSource( &systemData, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_USE_FLOOR_HEIGHT );
control->SetupEvents( DEFAULT_REPEAT_TIME, options->GetChildren().Num() );
control->AddEventAction(WIDGET_EVENT_PRESS).Set( WIDGET_ACTION_COMMAND, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_USE_FLOOR_HEIGHT );
options->AddChild( control );

control = new (TAG_SWF)idMenuWidget_ControlButton();
control->SetOptionType(OPTION_SLIDER_TEXT);
control->SetLabel("Custom Eye Height");
control->SetLabel("#str_swf_vr_character_cstmeyeh");
control->SetDataSource(&systemData, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_VIEW_HEIGHT);
control->SetupEvents(DEFAULT_REPEAT_TIME, options->GetChildren().Num());
control->AddEventAction(WIDGET_EVENT_PRESS).Set(WIDGET_ACTION_COMMAND, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_VIEW_HEIGHT);
options->AddChild(control);

control = new (TAG_SWF)idMenuWidget_ControlButton();
control->SetOptionType(OPTION_SLIDER_TEXT);
control->SetLabel("World Scale Adjust");
control->SetLabel("#str_swf_vr_character_wrldscal");
control->SetDataSource(&systemData, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_SCALE);
control->SetupEvents(2, options->GetChildren().Num());
control->AddEventAction(WIDGET_EVENT_PRESS).Set(WIDGET_ACTION_COMMAND, idMenuDataSource_Shell_VR_Character_Options::CHARACTER_OPTIONS_FIELD_SCALE);
Expand Down Expand Up @@ -160,7 +160,7 @@ void idMenuScreen_Shell_VR_Character_Options::Update() {
if ( BindSprite( root ) ) {
idSWFTextInstance * heading = GetSprite()->GetScriptObject()->GetNestedText( "info", "txtHeading" );
if ( heading != NULL ) {
heading->SetText( "VR Character Options" );
heading->SetText( "#str_swf_vr_character_head" ); //VR Character Options
heading->SetStrokeInfo( true, 0.75f, 1.75f );
}

Expand Down Expand Up @@ -439,17 +439,17 @@ idSWFScriptVar idMenuScreen_Shell_VR_Character_Options::idMenuDataSource_Shell_V

if ( bm == 0 )
{
return "Full Body + Arms";
return "#str_swf_vr_character_bodymode1"; //Full Body + Arms
}

if ( bm == 1 )
{
return "Hands + Weaps";
return "#str_swf_vr_character_bodymode2"; //Hands + Weaps
}

if ( bm == 2 )
{
return "Weapons Only";
return "#str_swf_vr_character_bodymode3"; //Weapons Only
}
}

Expand All @@ -460,22 +460,22 @@ idSWFScriptVar idMenuScreen_Shell_VR_Character_Options::idMenuDataSource_Shell_V

if ( fm == 0 )
{
return "Body";
return "#str_swf_vr_character_flashmnt1"; //Body
}

if ( fm == 1 )
{
return "Head";
return "#str_swf_vr_character_flashmnt2"; //Head
}

if ( fm == 2 )
{
return "Weapon";
return "#str_swf_vr_character_flashmnt3"; //Weapon
}

if ( fm == 3 )
{
return "Hand";
return "#str_swf_vr_character_flashmnt4"; //Hand
}

}
Expand All @@ -484,11 +484,11 @@ idSWFScriptVar idMenuScreen_Shell_VR_Character_Options::idMenuDataSource_Shell_V
{
if ( vr_weaponHand.GetInteger() == 0 )
{
return "Right Hand";
return "#str_swf_vr_character_weaphand1"; //Right Hand
}
else
{
return "Left Hand";
return "#str_swf_vr_character_weaphand2"; //Left Hand
}
}

Expand All @@ -513,23 +513,23 @@ idSWFScriptVar idMenuScreen_Shell_VR_Character_Options::idMenuDataSource_Shell_V
{
if (vr_useFloorHeight.GetInteger() == 1)
{
return "Marine eye height";
return "#str_swf_vr_character_useheght1"; //Marine Eye Height
}
else if (vr_useFloorHeight.GetInteger() == 2)
{
return "Normal view height";
return "#str_swf_vr_character_useheght2"; //Normal View Height
}
else if (vr_useFloorHeight.GetInteger() == 3)
{
return "Crouch to your height";
return "#str_swf_vr_character_useheght3"; //Crouch To Your Height
}
else if (vr_useFloorHeight.GetInteger() == 4)
{
return "Scale to your height";
return "#str_swf_vr_character_useheght4"; //Scale To Your Height
}
else
{
return "Custom eye height";
return "#str_swf_vr_character_useheght5"; //Custom eye height
}
}
case CHARACTER_OPTIONS_FIELD_SCALE:
Expand Down
Loading