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

button tool tip for hot keys #4125

Merged
merged 9 commits into from
Jan 30, 2023
Merged
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
10 changes: 9 additions & 1 deletion megamek/i18n/megamek/client/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ Cancel=Cancel
Close=Close
Next=Next
Previous=Previous
Left=Left
Right=Right
to=to
Error=Error
FROM=from
Expand Down Expand Up @@ -1558,8 +1560,10 @@ FiringDisplay.its_your_turn=It's your turn to fire.
FiringDisplay.fireMode=Mode
FiringDisplay.fireMore=More...
FiringDisplay.fireNextTarg=Next Target
FiringDisplay.fireNextTarg.tooltip=<html>Selects the next target (regardless of to hit.) <br>Holding shift when clicking will show next valid target that can be hit. <br>Holding control when clicking will cause allies to be ignored.</html>
FiringDisplay.fireNextTarg.tooltip=Selects the next target (regardless of to hit.) <br>Holding shift when clicking will show next valid target that can be hit. <br>Holding control when clicking will cause allies to be ignored.
FiringDisplay.fireNext=\ Next Unit
FiringDisplay.FireNextTarget.tooltip.Valid=Valid
FiringDisplay.FireNextTarget.tooltip.NoAllies=No Allies
FiringDisplay.fireStrafe=Strafe
FiringDisplay.OverheatNag.title=Allow overheating?
FiringDisplay.OverheatNag.message=Do you really wish to overheat? This will require a control roll.
Expand Down Expand Up @@ -2335,6 +2339,8 @@ MovementDisplay.UpToSpeed=Selected unit is up to speed so it can run/flank
MovementDisplay.UnjamRAC.title=Unjam?
MovementDisplay.UnjamRAC.message=Do you really wish to unjam? This will end your movement.
MovementDisplay.Mode=Mode
MovementDisplay.tooltip.ToggleMode=Toggle Mode
MovementDisplay.tooltip.ToggleMoveJump=Toggle Move / Jump

#Movement Mode display text
MovementType.None=None
Expand Down Expand Up @@ -3171,6 +3177,8 @@ TargetingPhaseDisplay.fireCancel=Cancel
TargetingPhaseDisplay.fireMode=Mode
TargetingPhaseDisplay.fireNextTarg=Next Target
TargetingPhaseDisplay.fireNextTarg.tooltip=Selects the next target (regardless of to hit.) \nHolding Control when clicking will show next valid target that can be hit.
TargetingPhaseDisplay.FireNextTarget.tooltip.Valid=Valid
TargetingPhaseDisplay.FireNextTarget.tooltip.NoAllies=No Allies
TargetingPhaseDisplay.fireNext=Next Unit
TargetingPhaseDisplay.fireSkip=Skip
TargetingPhaseDisplay.fireTwist=Twist
Expand Down
70 changes: 35 additions & 35 deletions megamek/mmconf/defaultKeyBinds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@
</KeyBind>

<KeyBind>
<command>nextWeapon</command> <!-- E -->
<keyCode>69</keyCode>
<command>nextWeapon</command> <!-- Down -->
<keyCode>40</keyCode>
<modifier>0</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>

<KeyBind>
<command>prevWeapon</command> <!-- Q -->
<keyCode>81</keyCode>
<command>prevWeapon</command> <!-- Up -->
<keyCode>38</keyCode>
<modifier>0</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>
Expand All @@ -106,58 +106,58 @@
</KeyBind>

<KeyBind>
<command>nextTarget</command> <!-- Dead Acute -->
<keyCode>129</keyCode>
<command>nextTarget</command> <!-- Right -->
<keyCode>39</keyCode>
<modifier>0</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>

<KeyBind>
<command>prevTarget</command> <!-- Dead Acute -->
<keyCode>129</keyCode>
<command>prevTarget</command> <!-- Left -->
<keyCode>37</keyCode>
<modifier>0</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>

<KeyBind>
<command>nextTargetValid</command> <!-- Dead Acute -->
<keyCode>129</keyCode>
<modifier>0</modifier>
<command>nextTargetValid</command> <!-- Shift-Right -->
<keyCode>39</keyCode>
<modifier>64</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>

<KeyBind>
<command>prevTargetValid</command> <!-- Dead Acute -->
<keyCode>129</keyCode>
<modifier>0</modifier>
<command>prevTargetValid</command> <!-- Shift-Left -->
<keyCode>37</keyCode>
<modifier>64</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>

<KeyBind>
<command>nextTargetNoAllies</command> <!-- Dead Acute -->
<keyCode>129</keyCode>
<modifier>0</modifier>
<command>nextTargetNoAllies</command> <!-- Ctrl-Right -->
<keyCode>39</keyCode>
<modifier>128</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>

<KeyBind>
<command>prevTargetNoAllies</command> <!-- Dead Acute -->
<keyCode>129</keyCode>
<modifier>0</modifier>
<command>prevTargetNoAllies</command> <!-- Ctrl-Left -->
<keyCode>37</keyCode>
<modifier>128</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>

<KeyBind>
<command>nextTargetValidNoAllies</command> <!-- C -->
<keyCode>67</keyCode>
<modifier>0</modifier>
<command>nextTargetValidNoAllies</command> <!-- Ctrl+Shift-Right -->
<keyCode>39</keyCode>
<modifier>192</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>

<KeyBind>
<command>prevTargetValidNoAllies</command> <!-- Z -->
<keyCode>90</keyCode>
<modifier>0</modifier>
<command>prevTargetValidNoAllies</command> <!-- Ctrl+Shift-Left -->
<keyCode>37</keyCode>
<modifier>192</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>

Expand Down Expand Up @@ -197,8 +197,8 @@
</KeyBind>

<KeyBind>
<command>autoArtyDeployZone</command> <!-- Shift-Space -->
<keyCode>32</keyCode>
<command>autoArtyDeployZone</command> <!-- Shift-Z -->
<keyCode>90</keyCode>
<modifier>64</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>
Expand Down Expand Up @@ -274,15 +274,15 @@
</KeyBind>

<KeyBind>
<command>prevMode</command> <!-- Tab -->
<keyCode>9</keyCode>
<command>prevMode</command> <!-- Down -->
<keyCode>225</keyCode>
<modifier>0</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>

<KeyBind>
<command>nextMode</command> <!-- Tab -->
<keyCode>9</keyCode>
<command>nextMode</command> <!-- Up -->
<keyCode>224</keyCode>
<modifier>0</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>
Expand All @@ -302,9 +302,9 @@
</KeyBind>

<KeyBind>
<command>fieldOfFire</command> <!-- Ctrl-F -->
<keyCode>70</keyCode>
<modifier>128</modifier>
<command>fieldOfFire</command> <!-- R -->
<keyCode>82</keyCode>
<modifier>0</modifier>
<isRepeatable>false</isRepeatable>
</KeyBind>

Expand Down
5 changes: 3 additions & 2 deletions megamek/src/megamek/client/ui/swing/AbstractPhaseDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ public void actionPerformed(ActionEvent e) {

@Override
public boolean shouldPerformAction() {
if ((!clientgui.getClient().isMyTurn() && (clientgui
.getClient().getGame().getTurn() != null))
if (((!clientgui.getClient().isMyTurn()
&& (clientgui.getClient().getGame().getTurn() != null)
&& (!clientgui.getClient().getGame().getPhase().isReport())))
|| clientgui.getBoardView().getChatterBoxActive()
|| display.isIgnoringEvents()
|| !display.isVisible()
Expand Down
Loading