Author Topic: [SUGGESTION] [PLAYER] [ADDED W/MODIFICATIONS] Remove Ctrl/Right-Click Invert  (Read 4699 times)

0 Members and 1 Guest are viewing this topic.

Offline Nepster

  • Posts: 1829
    • View Profile
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.
« Last Edit: January 19, 2016, 07:11:04 AM by namida »

Offline Nepster

  • Posts: 1829
    • View Profile
Re: [SUGGESTION] [PLAYER] Remove Option Ctrl/Right-Click Invert
« Reply #1 on: January 17, 2016, 03:32:36 PM »
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?

Online Simon

  • Administrator
  • Posts: 3885
    • View Profile
    • Lix
Re: [SUGGESTION] [PLAYER] Remove Option Ctrl/Right-Click Invert
« Reply #2 on: January 17, 2016, 06:23:28 PM »
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
« Last Edit: January 17, 2016, 06:46:53 PM by Simon »

Offline Nepster

  • Posts: 1829
    • View Profile
Re: [SUGGESTION] [PLAYER] Remove Option Ctrl/Right-Click Invert
« Reply #3 on: January 17, 2016, 07:49:47 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.

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.

Simplified snippets from the source: [...]
Thanks for the info.

Offline mobius

  • Posts: 2757
  • relax.
    • View Profile
Re: [SUGGESTION] [PLAYER] Remove Option Ctrl/Right-Click Invert
« Reply #4 on: January 17, 2016, 08:56:07 PM »
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


Offline Nepster

  • Posts: 1829
    • View Profile
Re: [SUGGESTION] [PLAYER] Remove Option Ctrl/Right-Click Invert
« Reply #5 on: January 17, 2016, 09:02:02 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.

Online Simon

  • Administrator
  • Posts: 3885
    • View Profile
    • Lix
Re: [SUGGESTION] [PLAYER] Remove Option Ctrl/Right-Click Invert
« Reply #6 on: January 17, 2016, 09:31:13 PM »
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
« Last Edit: January 17, 2016, 09:37:03 PM by Simon »

Offline namida

  • Administrator
  • Posts: 12401
    • View Profile
    • NeoLemmix Website
Re: [SUGGESTION] [PLAYER] Remove Option Ctrl/Right-Click Invert
« Reply #7 on: January 18, 2016, 03:14:58 AM »
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".
« Last Edit: January 18, 2016, 04:00:03 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 Nepster

  • Posts: 1829
    • View Profile
Re: [SUGGESTION] [PLAYER] [TODO] Remove Option Ctrl/Right-Click Invert
« Reply #8 on: January 18, 2016, 07:21:32 PM »
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.

Offline namida

  • Administrator
  • Posts: 12401
    • View Profile
    • NeoLemmix Website
Re: [SUGGESTION] [PLAYER] [TODO] Remove Option Ctrl/Right-Click Invert
« Reply #9 on: January 19, 2016, 07:10:09 AM »
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 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)