megaglest-source
megaglest-source copied to clipboard
Add Hotkeys for the unit and building commands
This is a proposal to add hotkeys for every command. This adds 10 configurable keys that map to the commands as displayed in the GUI. It's meant to be used in a grid layout such as QWER ASDF ZXCV to make the locations more intuitive. (although it doesn't have to, users can set each hotkey wherever they want to)
Fixes #212
@titiger would you like to test this with me and @Rampoina soon? Is this something you'd consider merging?
@Jammyjamjamman The controls are listed here in the README: https://raw.githubusercontent.com/MegaGlest/megaglest-source/master/docs/README.txt Is that generated from a script?
Yo @Rampoina , Good work!!! but wait up, tech engineer can't build Balista with hotkey. We need add at least 11 command.
And Summoner can't update to dragon, cuz we checking by numberCommands
at source/glest_game/gui/gui.cpp
line 460
if (i < numberCommands) {
mouseDownDisplayUnitSkills(i);
computeDisplay();
}
but some units like above have 3 commands in second line!
@pavanvo thanks for testing! I've bumped the number of hotkeys to 12 (the full grid) and fixed the issue with the morphing units (numberCommands wasn't updated correctly again ... I don't know if I'm missing something here, it seems like a variable that should exist, but I wasn't able to find it)
@Rampoina you forget to commit gui.h Now, with simple increment, it's working fine, but I'm trying to create another kind of check.
@pavanvo It's not only an increment, now it uses posDisplay
which is updated inside the previous for, including the case for morphing units.
(I force pushed the missing gui.h in the same commit)
@Jammyjamjamman The controls are listed here in the README: https://raw.githubusercontent.com/MegaGlest/megaglest-source/master/docs/README.txt Is that generated from a script?
Seems like this hasn't been done yet. @Jammyjamjamman imo this should be done before this gets merged.
There's some mods that crash the game with this patch:
- prax 0.5.9.7 (find in mod center)
- https://github.com/Robotkiller001/Megaglest-Improved-Mod
- https://github.com/Robotkiller001/Insects-World-Mod
There might be more that don't work. I'm not sure what causes the crash. In e.g. prax the crash happens when loading "hexer".
There's some mods that crash the game with this patch:
* prax 0.5.9.7 (find in mod center) * https://github.com/Robotkiller001/Megaglest-Improved-Mod * https://github.com/Robotkiller001/Insects-World-Mod
There might be more that don't work. I'm not sure what causes the crash. In e.g. prax the crash happens when loading "hexer".
i am tested on linux and windows - everything works fine, I think problem in build I found problem with "haxer"