Author Topic: [MISSING] Hotkey configuration menu  (Read 2433 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
[MISSING] Hotkey configuration menu
« on: September 21, 2023, 05:42:47 AM »
Loap supports configurable hotkeys, but at present these must be manually edited via the INI file. It would be good to implement a menu where these can be configured.

One complication is modifier keys (ie: like holding Shift + pressing a key, instead of just pressing the key). Loap supports designating keys as modifier keys, and any key can be designated as such. This needs to be factored into the hotkey configuation menu - including that a hotkey may ignore modifier keys, or specifically require no modifier keys are pressed, or require a combination of them rather than just one.

Another, likely much less troublesome issue, is that Loap does not prevent having multiple functions for the same key. It will generally just do both things if a key configured this way is pressed, if possible.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [MISSING] Hotkey configuration menu
« Reply #1 on: September 21, 2023, 05:42:55 AM »
For reference in the meantime, here are the values you can use for hotkey definitions. For the general structure of the file, read up on the basics of NeoLemmix text-based data files; Loap uses exactly the same structure for its text-based data files including this one.

The value for FUNCTION defines what the key does. List below.
The value for KEY defines what key needs to be pressed. Any value from the MonoGame Keys enum can be used. Unlike in NeoLemmix, the mouse buttons cannot be customized.
The value for PARAMETER depends on the FUNCTION of the key. Most FUNCTIONs do not use PARAMETER and in such cases it can be omitted.
The value for MODIFIER determines which modifier keys must be held. Zero means specifically no modifier, otherwise add 1 for Modifier 1, 2 for Modifier 2, 4 for Modifier 3, 8 for Modifier 4, etc. (Or in other words: 2^n, where n is the modifier index. Add values together to require a combination.) Omit it or set to -1 to ignore modifiers.

Values for FUNCTION (click to show/hide)
« Last Edit: September 21, 2023, 06:09:16 AM by namida »
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [MISSING] Hotkey configuration menu
« Reply #2 on: September 27, 2023, 10:13:59 PM »
I've begun implementing this at last. In its current state (commit bfac1a4), you can view the hotkeys sorted either by key or by function, but you can't edit them yet.

« Last Edit: September 28, 2023, 02:15:12 AM by namida »
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [MISSING] Hotkey configuration menu
« Reply #3 on: September 28, 2023, 02:16:04 AM »
As of commit e12b4cd, it is now possible to delete hotkeys, as well as to reset them to default. Adding new ones is still to come.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [MISSING] Hotkey configuration menu
« Reply #4 on: September 28, 2023, 04:28:24 AM »
The hotkey config menu is fully functional as of commit e0e2575.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)