Skip to content

Commit

Permalink
Merge pull request #4125 from kuronekochomusuke/buttonToolTipHotKeys
Browse files Browse the repository at this point in the history
button tool tip for hot keys
  • Loading branch information
SJuliez authored Jan 30, 2023
2 parents 4fb4817 + 7b5de45 commit 0456564
Show file tree
Hide file tree
Showing 18 changed files with 683 additions and 258 deletions.
10 changes: 9 additions & 1 deletion megamek/i18n/megamek/client/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ Cancel=Cancel
Close=Close
Next=Next
Previous=Previous
Left=Left
Right=Right
to=to
Error=Error
FROM=from
Expand Down Expand Up @@ -1593,8 +1595,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 @@ -2370,6 +2374,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 @@ -3206,6 +3212,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 @@ -102,8 +102,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

0 comments on commit 0456564

Please sign in to comment.