Mechanized Assault & eXploration Reloaded



#1 Oct 06, 2016 9:14 pm
mdooligan mdooligan Offline
Approved Member
Registered since: Dec 07, 2008
Posts: 36


Subject: HUD hotkeys do not work?
Thank you for the 0.2.9 release, a lovely piece of work.

I'm sure it's me being dumb or half blind, but the HUD hotkeys/shortcuts (eg F to toggle Fog display) in 0.2.9 do not work. Everything else does. I see they are registered, but they seem to be turned off somehow somewhere.

Is this a configuration thing, or a button I have clicked by accident? I can't seem to find anything that turns them on and off.

A separate question: I love that new implementation of the chatbox, very nice. Is there a config option to have the chatbox turned off on startup, escpecially for single player mode?
Miven Dooligan
Peace and cheer
↑  ↓

#2 Oct 07, 2016 1:44 am
mdooligan mdooligan Offline
Approved Member
Registered since: Dec 07, 2008
Posts: 36


Subject: Re: HUD hotkeys do not work?
As update to this, is seems the HUD hotkeys work when the game first starts, but stop working as soon as I select a unit.

I thought it may have had something to do with opening a saved game, but it does the same whether it's a new game or saved game.
Miven Dooligan
Peace and cheer
↑  ↓

#3 Oct 08, 2016 7:59 am
mdooligan mdooligan Offline
Approved Member
Registered since: Dec 07, 2008
Posts: 36


Subject: Re: HUD hotkeys do not work?
Update: when you select a unit, the hud hotkeys are deactivated.

src/ui/graphical/game/gamegui.cpp:186
DownloadSource code (Text):
  1.                 if (gameMap->getUnitSelection().getSelectedUnit() == nullptr)
  2.                 {
  3.                         hud->activateShortcuts();
  4.                 }
  5.                 else
  6.                 {
  7.                         //hud->deactivateShortcuts();
  8.                 }

So I commented the line out and my hud hotkeys go back to working. I'm guessing this was done because some of the unit hotkeys overlap the hud hotkeys, but it certainly isn't obvious that this would be the case. In the original, the number keys 1-0 are used for the unit menu actions.

To quote the original readme.txt from ca.1995:
DownloadSource code (Text):
  1.    Hot keys for unit commands:
  2.  
  3.    Press 1 (or the first letter of the word) for these functions:
  4.    ...Activate
  5.    ...Allocate
  6.    ...Auto-Survey
  7.    ...Build
  8.    ...Buy Upgrade
  9.    ...Disable
  10.    ...Place Mines
  11.    ...Reload
  12.    ...Repair
  13.    ...Research
  14.  
  15.    Press 2 (or the first letter of the word) for these functions:
  16.    ...Load
  17.    ...Start
  18.    ...Steal
  19.  
  20.    Press 3 (or the first letter of the word) for these functions:
  21.    ...Attack
  22.    ...Transfer
  23.  
  24.    Press 4 (or the first letter of the word) for the Manual function.
  25.  
  26.    Press 5 (or the first letter of the word) for these functions:
  27.    ...Enter
  28.    ...Upgrade
  29.    
  30.    Press 6 (or the first letter of the word) for the Upgrade All function.
  31.  
  32.    Press 7 (or the first letter of the word) for the Stop function.
  33.  
  34.    Press 8 (or the first letter of the word) for the Sentry function.
  35.  
  36.    Press 9 (or the first letter of the word) for the Done function.
  37.  
  38.    Press 0 (or the first letter of the word) for the Remove function.


Then I notice my keyCenterUnit is not working. I tracked that down to

src/ui/graphical/game/hud.cpp:106

where I inserted the line
DownloadSource code (Text):
  1.         auto centerButton = addChild (std::make_unique<cPushButton> (cPosition (4, 227), ePushButtonType::HudCenter));
  2.         /* oops, callback missing... */
  3.         centerButton->addClickShortcut (KeysList.keyCenterUnit);
  4.         signalConnectionManager.connect (centerButton->clicked, [&]() { centerClicked(); });
and now I can center the unit with the 'f' key. I guess nobody uses that key? How it got missed in the rush I don't know.
Miven Dooligan
Peace and cheer
↑  ↓

#4 Apr 07, 2017 6:05 pm
.GodRage .GodRage Offline
Mitglied
Registered since: Apr 30, 2016
Posts: 25


Subject: Re: HUD hotkeys do not work?
it would be good that users can set hotkeys themselves. Smiling
even by editing an xml file...

Survey on/off → H ... But also help if something is selected. :s
grid on/of → ...I don't even remember. xD
X-fer → X Heart
F11 → I would like it to be back to F1, or better: W key for exemple..

to speed up each turn... each player should be able to set up it's own shortcuts I guess...

I like the Alt+F6 to save a screen place... but for me it needs 2 hands to do so. xD
Ctrl+A ... Ctrl+T would have be better for me. :P (but maybe it's because I use a laptop, so the Alt key isn't really good.. Undecided )
↑  ↓

#5 Apr 07, 2017 11:22 pm
.GodRage .GodRage Offline
Mitglied
Registered since: Apr 30, 2016
Posts: 25


Subject: Re: HUD hotkeys do not work?
From channel #maxr Beko told me where to look for shortcuts: Innocent

C:\Users\GodRage\Documents\maxr\keys.xml Grinning

Just wondering if I can put 2 or 3 keys for a single action. (like the chat, having Tab, Enter, Enter (numpad) would be lovely Heart )
↑  ↓

#6 Apr 07, 2017 11:30 pm
beko beko Offline
Developer, Administrator
Registered since: Jun 04, 2004
Posts: 2,221


Subject: Re: HUD hotkeys do not work?
Try it Smiling Some keys may take precedence before others.
Bernd Kosmahl
"Sir, we are surrounded!" - "Great - we can attack in any direction."
↑  ↓

#7 Apr 08, 2017 12:18 am
.GodRage .GodRage Offline
Mitglied
Registered since: Apr 30, 2016
Posts: 25


Subject: Re: HUD hotkeys do not work?
Hmmmm I tried and MAXR replace my modifications by default modifications when I run it. Sad
↑  ↓

Pages (1): 1


All times are GMT +02:00. Current time: 2:37 am.