[SUGGESTION] [PLAYER] [ADDED W/MODIFICATIONS] Remove Ctrl/Right-Click Invert

Started by Nepster, January 17, 2016, 03:21:28 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Nepster

Status: I feel more changes than simply removing the option are justified in regards to this; see reply #7. These changes have been implemented for the next update.

Nepster

Suggestion: Remove this option altogether and keep option 2 free for the time when you split the sound and music option. As a replacement for this option the right-click might be added as a customizable hotkey.

Reason:
1) Ctrl can be redefined as any hotkey function. So I have actually no clue what this option does with redefined Ctrl-hotkeys? Either the title of this option is wrong (if it always assigns right-click the select-walker option) or the description found here in the forum is wrong (if it swithes right-click with ctrl for all purposes).

2) We have now customizable hotkeys. So why switch right-click with ctrl and no other key? For the player a much cleaner and better understandable solution would be to add right-click to the hotkey menu and make it completely customizable.
Alternatively just fix right-click to one specific purpose. Here I am not sure whether highlighting a lemming is the best choice. At least I use this feature almost never.

Further question: Is there anyone using this option?

Simon

I guess that it affects RMB only: Option no => RMB highlights lem; Option yes => holding RMB inverts priority.

Agree with reasons 1) and 2), agree wich suggestions. In particular, agree with separate option for sound, I'd use no music, but sound.

Anyone using it right now: I have set the option to yes, haven't tested what happens on no. I have bound the nuke to LCtrl. Even with option yes, LCtrl nukes.

The remapping dialog is a hackjob to get powerful hotkey mapping. It maps keys to game functions. Much more interestingly, game functions should be mappable to keys.




Simplified snippets from the source:

    if GameParams.CtrlHighlight then begin
        Game.RightMouseButtonHeldDown := ssRight in Shift;
        Game.CtrlButtonHeldDown := ssCtrl in Shift;
    end
    else begin
        Game.RightMouseButtonHeldDown := ssCtrl in Shift;
        Game.CtrlButtonHeldDown := ssRight in Shift;
    end;

Clicking on the map:

    if (Button = mbLeft) and not Game.CtrlButtonHeldDown then
        Game.ProcessSkillAssignment;
    if Game.CtrlButtonHeldDown then
        Game.ProcessHighlightAssignment;

From the function that determines assignment priority:

    if LemRemoved or LemTeleporting
            or (RightMouseButtonHeldDown and (LemAction <> baWalking)) then
        /* ignore this lem */

The names of these checks predate mappable Ctrl and mappable RMB. In this light, "switch Ctrl with RMB" becomes a more understandable option name. The option name still doesn't tell the player anything.

-- Simon

Nepster

Quote from: Simon on January 17, 2016, 06:23:28 PM
In particular, agree with separate option for sound, I'd use no music, but sound.
You can already do this: Set the Music&Sound option to FX.

Quote from: Simon on January 17, 2016, 06:23:28 PM
The remapping dialog is a hackjob to get powerful hotkey mapping. It maps keys to game functions. Much more interestingly, game functions should be mappable to keys.
Well, this way has the advantage that you can map several hotkeys to the same game function. I have three seperate keys for "Select only walkers" and two for "Pause", so that I can reach them whereever my fingers are.

Quote from: Simon on January 17, 2016, 06:23:28 PM
Simplified snippets from the source: [...]
Thanks for the info.

mobius

I guess I vote to have right mouse button customizable. I always set this option to the non-default because I'm used to and like having the right mouse button select walkers. I use the button often and having the most often used button on the mouse is good.
I don't use the select lemming feature as often; however, I do really like this feature and glad it's there, even though I often forget about it. :(

What am I missing; what does this have anything to do with sound or music options? ???
everything by me: https://www.lemmingsforums.net/index.php?topic=5982.msg96035#msg96035

"Not knowing how near the truth is, we seek it far away."
-Hakuin Ekaku

"I have seen a heap of trouble in my life, and most of it has never come to pass" - Mark Twain


Nepster

Quote from: möbius on January 17, 2016, 08:56:07 PM
What am I missing; what does this have anything to do with sound or music options? ???
Not much. It is just a positive side-effect that removing option 2) gives the opportunity to split sound and music options, which is a first step to implement also volume-control for them.

Simon

For clarification: Like möbius, I like RMB to invert priority, not highlight the lemming.

Nepster: Thanks for the tip, how only-sound is already possible to select. I've never tried changing that option, and never found out it had 3 settings instead of yes/no.

For the longer term, I still recommend a standard options dialog over the current options menu. Let's use standard widgets like checkmarks for clear yes/no options, radio buttons for others, whatever is most appropriate. I assume Delphi is tailored towards this. :-)

-- Simon

namida

Yes, creating a dialog-based config menu would not be difficult at all. I simply haven't got around to doing so yet; the idea only came up just a short time before V1.37n's release.

I'll look into how practical it is to add right-click to the remappable keys (and if I were to do that, middle-click (currently hardcoded to Pause) should probably be added too; maybe even left-click too?). One thing that comes to mind is the slightly different behaviour in terms of highlighting between the old and new options - currently (or at least prior to hotkeys becoming remappable beyond this single swap option), if Right Click was configured to be highlight, it was just a matter of point, right-click. However, if Ctrl was, it was point, hold ctrl, left-click.

Perhaps then, the replacement for this option is to determine whether highlighting is just a matter of point, click; or whether it's a matter of point, hold modifier, click. However, this would then raise the question - should force walker selection *also* have this toggle? The counterargument here being that unlike highlight, which in most games that support it (L3D comes to mind as an exception) it's always been a matter of directly clicking, and thus there should at least be an option to (if it's assigned to a mouse button) work from a direct click; while priority invert has never been that way, it's always (even when on a mouse button) been "hold priority invert, normal click lemming".
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Nepster

Currently all hotkeys like directional select and select unused lemming work by pressing the hotkey and then left-clicking on the lemming. This should be kept consistent and also apply to selecting walkers or hightlighting lemmings via hotkeys.

However pressing two mouse buttons is very unnatural. So any behavior assigned to a mouse key should be applied directly.

Finally regarding the left-click: This is used for so many purposes that it will only create a huge amount of bugs when being remappable. Moreover this allows settings where the current left-click is not available through any means, making playing levels essentially impossible. This should be avoided at all costs.

namida

Alright, implemented. If you wanted to test it in action, the latest experimental release includes this feature.

Middle-click and right-click are both now remappable; left-click is not.
The "Ctrl / Right Click Invert" option has been replaced with the "One-Click Highlight" option. When this option is enabled, then if highlight is assigned to a mouse button (be it middle or right), then merely clicking with that button is enough to highlight a lemming (or apply a skill to that lemming). When the option is disabled, you must hold the highlight button and left-click the desired lemming or skill.
The option does not affect keyboard hotkeys either way; they're always hold + left-click.

Defaults are Middle Click = Pause, Right Click = Highlight, One-Click Highlight on - in other words, exactly as the defaults in NeoLemmix have always been; you just have the option to customize them now.

The direct-click behaviour does not carry over to any other features; it applies solely to highlight. Anything else that would usually require hold + left click, still requires hold + left click, even if assigned to a mouse button (of course, if the function assigned to it works directly - for example, Pause being assigned to middle-click - you don't need to hold it and left click).

Existing hotkey configurations will be automatically updated to set those functions on the mouse buttons; but it's possible that if you have an existing configuration, it might not automatically set the One-Click Highlight to on.

If you encounter any bugs with this, please start a new topic, and make a note that it relates to the experimental release.
My 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)