Skip to content

Commit

Permalink
Y-axis input now can be inverted
Browse files Browse the repository at this point in the history
  • Loading branch information
yvt committed Feb 14, 2014
1 parent dbfe56a commit 40a1f44
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 14 deletions.
29 changes: 22 additions & 7 deletions Resources/Locales/ja_jp/openspades.po
Original file line number Diff line number Diff line change
Expand Up @@ -286,37 +286,37 @@ msgctxt "Preferences"
msgid "Exponential Power"
msgstr "マウス加速指数"

#: ../../Scripts/Gui/Preferences.as:675
#: ../../Scripts/Gui/Preferences.as:675 ../../Scripts/Gui/Preferences.as:676
msgctxt "Preferences"
msgid "Reload"
msgstr "リロード"

#: ../../Scripts/Gui/Preferences.as:676
#: ../../Scripts/Gui/Preferences.as:676 ../../Scripts/Gui/Preferences.as:677
msgctxt "Preferences"
msgid "Capture Color"
msgstr "色をコピー"

#: ../../Scripts/Gui/Preferences.as:677
#: ../../Scripts/Gui/Preferences.as:677 ../../Scripts/Gui/Preferences.as:678
msgctxt "Preferences"
msgid "Equip Spade"
msgstr "スペードを装備"

#: ../../Scripts/Gui/Preferences.as:678
#: ../../Scripts/Gui/Preferences.as:678 ../../Scripts/Gui/Preferences.as:679
msgctxt "Preferences"
msgid "Equip Block"
msgstr "ブロックを装備"

#: ../../Scripts/Gui/Preferences.as:679
#: ../../Scripts/Gui/Preferences.as:679 ../../Scripts/Gui/Preferences.as:680
msgctxt "Preferences"
msgid "Equip Weapon"
msgstr "銃を装備"

#: ../../Scripts/Gui/Preferences.as:680
#: ../../Scripts/Gui/Preferences.as:680 ../../Scripts/Gui/Preferences.as:681
msgctxt "Preferences"
msgid "Equip Grenade"
msgstr "手榴弾を装備"

#: ../../Scripts/Gui/Preferences.as:681
#: ../../Scripts/Gui/Preferences.as:681 ../../Scripts/Gui/Preferences.as:682
msgctxt "Preferences"
msgid "Switch Tools by Wheel"
msgstr "ホイールで装備切替"
Expand Down Expand Up @@ -472,41 +472,49 @@ msgid "Say Team"
msgstr "チームチャット"

#: ../../../Sources/Client/Client.cpp:2250
#: ../../../Sources/Client/Client.cpp:2254
msgctxt "Client"
msgid "NOW LOADING"
msgstr "読み込み中"

#: ../../../Sources/Client/Client.cpp:2545
#: ../../../Sources/Client/Client.cpp:2549
msgctxt "Client"
msgid "Out of Block"
msgstr "ブロックがありません"

#: ../../../Sources/Client/Client.cpp:2550
#: ../../../Sources/Client/Client.cpp:2554
msgctxt "Client"
msgid "Out of Grenade"
msgstr "手榴弾がありません"

#: ../../../Sources/Client/Client.cpp:2558
#: ../../../Sources/Client/Client.cpp:2562
msgctxt "Client"
msgid "Reloading"
msgstr "リロード中"

#: ../../../Sources/Client/Client.cpp:2561
#: ../../../Sources/Client/Client.cpp:2565
msgctxt "Client"
msgid "Out of Ammo"
msgstr "弾切れです"

#: ../../../Sources/Client/Client.cpp:2564
#: ../../../Sources/Client/Client.cpp:2568
msgctxt "Client"
msgid "Press [{0}] to Reload"
msgstr "[{0}] を押すとリロードします"

#: ../../../Sources/Client/Client.cpp:2600
#: ../../../Sources/Client/Client.cpp:2604
msgctxt "Client"
msgid "Waiting for respawn"
msgstr "リスポーンを待機中"

#: ../../../Sources/Client/Client.cpp:2643
#: ../../../Sources/Client/Client.cpp:2647
msgctxt "Client"
msgid "Following {0}"
msgstr "{0} を追跡中"
Expand Down Expand Up @@ -552,11 +560,18 @@ msgid "{0}'s Territory"
msgstr "{0}のテリトリー"

#: ../../../Sources/Gui/MainScreen.cpp:230
#: ../../../Sources/Gui/MainScreen.cpp:231
msgctxt "MainScreen"
msgid "NOW LOADING"
msgstr "読み込み中"

#: ../../../Sources/Client/Client.cpp:2598
#: ../../../Sources/Client/Client.cpp:2602
msgctxt "Client"
msgid "You will respawn in: {0}"
msgstr "リスポーンまであと: {0}秒"

#: ../../Scripts/Gui/Preferences.as:675
msgctxt "Preferences"
msgid "Invert Y-axis Mouse Input"
msgstr "Y軸の入力を反転"
29 changes: 22 additions & 7 deletions Resources/Locales/pot/openspades.pot
Original file line number Diff line number Diff line change
Expand Up @@ -281,37 +281,37 @@ msgctxt "Preferences"
msgid "Exponential Power"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:675
#: ../../Scripts/Gui/Preferences.as:675 ../../Scripts/Gui/Preferences.as:676
msgctxt "Preferences"
msgid "Reload"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:676
#: ../../Scripts/Gui/Preferences.as:676 ../../Scripts/Gui/Preferences.as:677
msgctxt "Preferences"
msgid "Capture Color"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:677
#: ../../Scripts/Gui/Preferences.as:677 ../../Scripts/Gui/Preferences.as:678
msgctxt "Preferences"
msgid "Equip Spade"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:678
#: ../../Scripts/Gui/Preferences.as:678 ../../Scripts/Gui/Preferences.as:679
msgctxt "Preferences"
msgid "Equip Block"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:679
#: ../../Scripts/Gui/Preferences.as:679 ../../Scripts/Gui/Preferences.as:680
msgctxt "Preferences"
msgid "Equip Weapon"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:680
#: ../../Scripts/Gui/Preferences.as:680 ../../Scripts/Gui/Preferences.as:681
msgctxt "Preferences"
msgid "Equip Grenade"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:681
#: ../../Scripts/Gui/Preferences.as:681 ../../Scripts/Gui/Preferences.as:682
msgctxt "Preferences"
msgid "Switch Tools by Wheel"
msgstr ""
Expand Down Expand Up @@ -467,41 +467,49 @@ msgid "Say Team"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2250
#: ../../../Sources/Client/Client.cpp:2254
msgctxt "Client"
msgid "NOW LOADING"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2545
#: ../../../Sources/Client/Client.cpp:2549
msgctxt "Client"
msgid "Out of Block"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2550
#: ../../../Sources/Client/Client.cpp:2554
msgctxt "Client"
msgid "Out of Grenade"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2558
#: ../../../Sources/Client/Client.cpp:2562
msgctxt "Client"
msgid "Reloading"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2561
#: ../../../Sources/Client/Client.cpp:2565
msgctxt "Client"
msgid "Out of Ammo"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2564
#: ../../../Sources/Client/Client.cpp:2568
msgctxt "Client"
msgid "Press [{0}] to Reload"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2600
#: ../../../Sources/Client/Client.cpp:2604
msgctxt "Client"
msgid "Waiting for respawn"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2643
#: ../../../Sources/Client/Client.cpp:2647
msgctxt "Client"
msgid "Following {0}"
msgstr ""
Expand Down Expand Up @@ -547,11 +555,18 @@ msgid "{0}'s Territory"
msgstr ""

#: ../../../Sources/Gui/MainScreen.cpp:230
#: ../../../Sources/Gui/MainScreen.cpp:231
msgctxt "MainScreen"
msgid "NOW LOADING"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2598
#: ../../../Sources/Client/Client.cpp:2602
msgctxt "Client"
msgid "You will respawn in: {0}"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:675
msgctxt "Preferences"
msgid "Invert Y-axis Mouse Input"
msgstr ""
1 change: 1 addition & 0 deletions Resources/Scripts/Gui/Preferences.as
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ namespace spades {
ConfigNumberFormatter(2, "x"));
layouter.AddSliderField(_Tr("Preferences", "Exponential Power"), "cg_mouseExpPower", 0.5, 1.5, 0.02,
ConfigNumberFormatter(2, "", "^"));
layouter.AddToggleField(_Tr("Preferences", "Invert Y-axis Mouse Input"), "cg_invertMouseY");
layouter.AddControl(_Tr("Preferences", "Reload"), "cg_keyReloadWeapon");
layouter.AddControl(_Tr("Preferences", "Capture Color"), "cg_keyCaptureColor");
layouter.AddControl(_Tr("Preferences", "Equip Spade"), "cg_keyToolSpade");
Expand Down
4 changes: 4 additions & 0 deletions Sources/Client/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ SPADES_SETTING(cg_ejectBrass, "1");
SPADES_SETTING(cg_mouseSensitivity, "1");
SPADES_SETTING(cg_zoomedMouseSensScale, "0.6");
SPADES_SETTING(cg_mouseExpPower, "1");
SPADES_SETTING(cg_invertMouseY, "0");

SPADES_SETTING(cg_chatBeep, "1");
SPADES_SETTING(cg_hitIndicator, "1");
Expand Down Expand Up @@ -950,6 +951,9 @@ namespace spades {
x *= (float)cg_mouseSensitivity;
y *= (float)cg_mouseSensitivity;

if(cg_invertMouseY)
y = -y;

p->Turn(x * 0.003f, y * 0.003f);
}
}
Expand Down

0 comments on commit 40a1f44

Please sign in to comment.