mouse button behavior

Would you be willing to change the right mouse button behaviour?

  • Yes.

    Votes: 5 100.0%
  • No

    Votes: 0 0.0%
  • What are mouse buttons? Give me more key bindings!

    Votes: 0 0.0%

  • Total voters
    5

overdhose

Active Member
Contributor
Design
World
GUI
Cervator edit: the code as far as it got is in the miniion branch in @overdhose's engine fork (it is legacy-era so modules were still in the engine)

Doing a bit of ui work for the miniions mod, I got into a chat with Cervator about radial menu's he would like to add to some tools. This resulted in the following proposal : change the default behvior of the left mouse button.

I'm guessing there is a historic evolution, and I get it, right add, left remove, it's simple and you can even teach it to a monkey, and for a classic minecraft where all you could do was add and remove blocks, it makes sense. So it still makes sense for a freestyle mode.

But ultimately (very ultimately) in survival mode we will have quite a bit of management in the game, and it seems a shame to waste a mouse button on functionality that can easily be achieved with 1 button, and even would make sense:

Hold a block => place it, Hold correct tool => remove block, hold an item => use it. All possible with left button, and that would free up the right button to do something different like either release the mouse cursor, or open a a radial popup menu, or even something else if you have any ideas about it.

Speak up and let me know if there are major objections / better ideas
 
Last edited by a moderator:

metouto

Active Member
Contributor
Art
Never played many games so I have not hang ups on which do what just as long as it is written down ... this does this... and that does that .... (that is another 1/2 cent worth from me ... wow I spent 1 whole cent in two post) :coffee:
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
I don't consider the MC-like mouse setup sacred or anything, if we can have a better control scheme then yay! In particular if it can also transfer intuitively to other platforms better (only one "click" on Android, for instance)

At the same time there are always drawbacks and benefits. Offering two click options per item in the toolbar could be nice, like the idea of offering a right-click option to open said radial menu if the tool is correct (or even a right hold working differently than a right click).

Binding item usage entirely to one click opens up useful potential for the other click, but like items that don't really have two different options (IIRC right now pickaxe = break stuff on one click, nothing on other click) there might still be stuff that wastes the alternative click.

Still .. I could imagine Terasology in the most creature centric mode playing a bit like Sacrifice where there are always creatures to control (or spells to cast) where it definitely would seem to make sense to dedicate an entire mouse button for that. Yeah maybe in free style right click could pop up a block picker instead? Probably should be customizable either way

Right mouse button hold for popup radials is tempting though. Then can has three click types! (left hold should still be continuous "break block" I figure)

I think me being really sleepy might be clouding the clarity of this post :sleep:
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
At the moment we have three interactions - attack, use and frob (use object in world, such as a chest). If the first two were combined and context sensitive, then the last might be a right-click? This can cover a number of use cases, such as using an item on another player, popping up a menu related to the target or whatever I guess. Is that sort of what you have in mind?
 

overdhose

Active Member
Contributor
Design
World
GUI
aye, just adding diversity to the right click. It's true that for chests it could be used as a way to open it, and even present a radial menu if button was held down long enough (radial with different options related to chest).

Though if you ask me, the frob button could remain the way it is atm. If we do decide on a radial menu's, I would make it just radial menus, and not necessarily single click < > click hold behavior as that can be annoying to (from my personal viewpoint, not sure how many share it, and it's not like I'm absolutely against it, actually I refrain from using it due to comments from others). Radials could do a lot of things, one good example might be crafting : the whole press q right click is a bit counter intuitive atm, right clicking a block and choosing "craft here" might be an improvement for example. Similarly, another option could be spawn minion, create zone (or whatever similar), open options menu, pauze, once mp is in place it could initiate trade etc. For specific blocks it could be open chest, open furnace, add fuel to furnace, give name to furnace (in case you like to greet things in the morning)

right now the minion menu or popup or however I need to call it works pretty much the same way, just that you need to be holding an otherwise useless item to activate it. However, implementing the process is error prone. Item needs the openuicomponent, openuicomp needs the name of a ui screen that was created and initialized somewhere else in the code. And if you badly implement the ui, you can't close it anymore, and trying fancy tricks you easily run in focus problems.

Radials could also open the way to more mod friendliness, an easy way to add actions to the game. Instead of an openuicomponent, we add a radial component, which lets you add an entry for said item / block. And it might also fit in the more android and whatever else oriented ui's. Thinking while writing, something like this might work :
drop pc etc, touch based system, you touch screen radial pops up. annoying maybe, but radial lets you drag one of the choices to a hot spot, and that becomes your action. It could be a tool, an item, or a plain action, or even another radial for the matter. Take that as a starting point and then add ease of use to said system depending on input diversity. touch hot spot and you selection is gone, next touch opens radial again. I have little xp with the whole touch controls, and the ones I have weren't always very positive. I'm old, I like mouse input. Touch screens always remind me of the vgcats comic that depicted a ds chasing another console while repeating: "touch me" "touch em" "touch me"... and the other console screaming in panic : "stay away you freak". Not that I hate the ds, but even on that platform touch input can be really annoying for certain games, and thats where you just play it with classic controls.

Still a bit of a controller lover myself, which would be a complete different story again. But I can imagine pressing a button and scrolling through a radial just fine. And yeah in the end I guess Terasology will want to support as many as possible, and defining one clear way of interacting with the world might be a good thing now before it becomes even more complicated to change it.

With the radials will come other complaints again most likely : keys. And I'll be blunt about my (personal) vision for that : if you like keys so much, I'm sure I can come up with a scheme more complicated then DF just to suit your needs, mine has 124 readily usable, not counting the mouse, I hope yours has as many to, to emulate the radial menu behaviour. and if you are really sado-masochistic, I could even look into a controller + keyboard layout just for you. No kidding. If you like playing games on your laptop sitting in couch while watching television and have a complaint about missing a keybinding, well, it's for your own health :p. Laptops cause strain on your neck muscles! And your eyes! If you really want to play on your laptop, do your body a favor : go sit at a desk, and while you are there, hook up a mouse. Or buy a trackball. problem solved.
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Why not use the mouse wheel for some radial menu action? I think most players will have the wheel and most mouses support even clicking it.
The one-button-solution may cause problems with some items, e.g. in the combat system. Think of a bow you charge with left click and zoom with right, or shield and sword with blocking and attacking.
My idea would be to let each tool/mod assign the keys as it needs them, but of course we can provide a default binding like described above.
 

Nym Traveel

Active Member
Contributor
Art
World
When reading through this, I had to think about crysis 1 which had a nice radial menue for changing your suite-mode.
I would totally sacrifice the right mouse button for a context-sensitiv radial menue :D
 

Josh

Member
Contributor
Hunter
Why not use the mouse wheel for some radial menu action? I think most players will have the wheel and most mouses support even clicking it.
The one-button-solution may cause problems with some items, e.g. in the combat system. Think of a bow you charge with left click and zoom with right, or shield and sword with blocking and attacking.
My idea would be to let each tool/mod assign the keys as it needs them, but of course we can provide a default binding like described above.
Not all computers have mouse's that means if you use a laptop you're screwed.
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Not all computers have mouse's that means if you use a laptop you're screwed.
But playing a game such as this on a laptop without mouse is quite tedious. Just for building stuff it may be okay, but thinking of combat scenes makes me wonder how you will do that on a laptop without external mouse...
 

overdhose

Active Member
Contributor
Design
World
GUI
Not all computers have mouse's that means if you use a laptop you're screwed.
hmmm that didn't take long, I could quote myself on that but I'll add this:
does your laptop have a usb port? Will you now compare me to Nintendo because I require you to have a mouse, or mouse like input device? Did you know I have obtained free mice with purchase of other products? If your computer has no mouse as you state, I'm guessing you are playing the game looking in the same direction you spawn presuming the game is some twisted boring platform game?

Let's be clear about this : I would leave the input for freestyle the way it is. Maybe freestyle is all you want to play. And in that case, you can. But seriously, even the current minion command item, I don't see myself using it on a laptop's touchpad.
 

overdhose

Active Member
Contributor
Design
World
GUI
The one-button-solution may cause problems with some items, e.g. in the combat system. Think of a bow you charge with left click and zoom with right, or shield and sword with blocking and attacking.
I mentioned the 1 button solution because Cervator mentioned some platform which only had 1 button or so and wanted to create an ui compatible for that (Ouya or something of the kind) and if you read carefully, I only suggested to look at it as a base interaction way, and add additional controls depending on your platform. When you talk about bows, sword and shield, I deeply wonder how you will control that on a touch screen.
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
You're right at that point, overdhose. So, just to clarify it for myself, one possible way would be to have
  • left click -> item action/block placement
  • right click ?
  • right mouse pressed -> radial menu
  • middle mouse ?
or am I still getting it wrong?
 

overdhose

Active Member
Contributor
Design
World
GUI
No that's a possible way of doing things. One point I failed to mention, the radial could also free the inventory key. Could just as well have an option in the radial to open inventory. As for right click, it could be a default frob action if you really want that option. By middle mouse I suppose you mean the click, and not the scroll. I already have people complaining they don't have a mouse, so I intentionally left that one out.
I would keep the scrolling as is, though it could be used to browse the radial when it's open instead of scrolling the toolbar. So right click + scroll and then release could pick an action, or you could ungrab the mouse while the radial is open and select with cursor, or even a combination of both. I guess given some effort we could leave the option to the user.
And we recover 2 key bindings that people use a lot in a standard wsad, or zsqd setup, mainly the e button and a/q. You could still use them as is, or envision other possibilities. If you are hell bent on keeping the rmb, you could even assign the radial to one of those buttons instead, which you can do in the settings.

Another way of doing things could be releasing the mouse when holding the rmb, like in some other games, so you could access menus.
I know there will never be a unanimous consensus about the preferred way, but as we currently develop on pc, we might at least optimize that to start, and at the same time cut away some of the jungle that is the current ui and open a path for better/more modding support. And maybe it's because I am already working a more worker oriented game that I don't really like the current input logic. And I'm still presuming that will be a big part of the game.

While you can work around it, I think the game would benefit greatly by adopting a more versatile input logic, designed to suit the game.

As far as i am concerned, if I had complete control over it, I would even drop the toolbar, and leave two default "weapon layouts" you can swap, so you could equip a sword + shield and a craft tool you currently use. If you get attacked, you can quickly swap to weapon layout to defend yourself, then swap back and continue gathering. If you want to change the layout you pop up the radial. But i wouldn't want to spook you to hard :D
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
I totally agree with you! :) I would like to test all that stuff at once :D I personally like the "mini-inventory" introduced by Adeon in the crafting system a lot, maybe we can make it available beyond crafting mode as well.
Your point about dropping the toolbar reminds me of weapon/tool configurations you can change via hotkeys, but thats pretty much the mini-inventory I think....
 

overdhose

Active Member
Contributor
Design
World
GUI
Well I started cleaning up a bit, added some more buttons to the minions ui and settings to the mod that are persisted, I'll see if I can come up with a menu design that could be used for this. Funny thing is the motion controller Cervator just received, but oh well...
 

Esereja

Active Member
Contributor
one thing sure: we need unified style in buttons behavior. Or maybe "api" style so you have meta functions on programmers side and on option you choose style how those meta things work in reality.
 

overdhose

Active Member
Contributor
Design
World
GUI
I have sinned a lot myself in that area :whistle: : I now have 3 mod button types for my ui : arrows, icon buttons and menu buttons (and a 4th one in making : radio buttons). Each one has it's own texture file, and slightly different behaviour. The icon buttons have a disabled state so they appear grey and don't react to mouse over events and specific types for each icon available, the arrow buttons have 4 types being up, down, left and right, and the menu buttons have a specific style to match the ui and the default Normal - Toggle state. And they aren't completely modifiable anymore, and have a slightly different way of behaving on mouse over (as long as the mouse is above them they appear in hover state, which was not the case with the default buttons). I decided to make my own widgets not to interfere with the core coding atm out of fear it might cause issues, and to follow the "module" logic of not changing "engine" code. I also added a hover text to them that appears on mouse over.

It's obvious that if everyone did this we'd have a lot of different ui styles over all mods.

I agree with your vision Esreja, but at the same time I'm happy I still had the liberty at this point to adjust the ui to really suit my needs. I looked at the future ui work, but all that does is move the ui layout to an external file. And I guess if I moved all my textures into 1 file, I could define a "style" just by the texture name, which would allow others to create their own "style" based on a different texture. A better way might be to create a grayscale base texture, which you can color with a defined "color palette" so it appears even more unified. I'm not enitrely sure if that would work with the transparent parts, but I'll look into modifying my code towards that goal.

here are the current individual files as example:
Arrows.pngmodularbutton.pngspecialbuttons.pngtoggle.png
Even if I greyscaled most, I'm not sure how to handle the icon buttons. For one as was pointed out, I'm not a real artist and I wouldn't wonna admit how much time it took me to just create those :notworthy:

Offering modders the possibility to add icon buttons will always result in same issue. And you can't really offer a ton of usable predefined icons, as you never know what crazy icons they would need. Yet if someone felt compelled to create a better style for the icons, here's what they represent :
(in order of the file) settings, minion list, zone management, building management, crafting management, and message management. I have a spare "spot in my ui which I called minimap as that seems the most logical one to add over time, and then the last one I left blank as a template to create more if I needed.

I did try to add bit of a theme to them by using black with yellow outline as normal state, yellow with purple outline as hover and purple with black outline as pressed.

Now to be blunt again : I don't think moving the definition of the ui to an external json file will solve mush of the issues, besides the annoyance of having to edit code in 2 places (from a cders point of view) But lets face it, if you make an ui, you will most likely still need code that goes with it. So I lack vision as to how I could create a more closed system to handle all that, while leaving enough room not to discourage people
 

overdhose

Active Member
Contributor
Design
World
GUI
made a bit of a mockup with my superior drawing skills of what it could look like

mockupradial.png

not entirely sure if it makes sense, but I started by dividing 4 main directions, up down left right, decided that the middle could be a very common event, maybe Inventory and default frob need to switch places. Anyway I thought the four / five main points could be main menu, Zoning (or whatever that will become), default interaction, crafting and inventory. then I divided the remaining space in eight more sections, subconsciously creating a clock / zodiac. Maybe we could come up with a custom zodiac for the terasology world, and use them as icons for the radial menu layout, abstracting icons and functionality a bit. I found some example source code and will try to make an example, triggered by using the zone selection tool for now as a test case
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Posting here to admit I haven't had time to keep up with all the awesome discussion or come up with a lot of insightful stuff myself :D

I did read everything and think we're on a good track. Yeah, the json definitions won't save us, they need to come with an overall GUI vision that'll be compatible in design across different platforms (keyboard/mouse vs. touch vs. controller vs. motion) and sizes of available screen space.

A zodiac is a cool idea, but who says a zodiac should have 12 signs :D I say we base on 8, as that way we both get a very handy grid design (okay, center makes 9, which could be inactive in a radial menu) as well as an instant mapping to a numpad as well as the max easy numbers of fingers (thumbs are a little sketchy on the Leap so I figure that'll be a general issue). That again goes well on console-type controllers and so on. Heck, in that case, if we do keep a tool bar who says it should have 10 items instead of 8? :)

The "what goes where" GUI thread is probably heavily related to this since it sort of forms the basis on what the mouse button behavior can sit on top of. In there as well I'm also attracted to '8' although again sort of cheating on the center of something also being a thing :p We could even consider the corner "bar" that Nym Traveel suggested in there, and if we really want to go nuts on 8 the "selected" item spot could be diagonally split and each represent one hand/active item

I love the idea of using a number like 8 in a wider term beyond GUI like an actual zodiac, graphic constellations set in the sky, lore-focus on the number, and so on.

Anway ... this thread derailment brought to you by the number 12 (surprisingly), as in midnight, as in Cerv needs to stop posting while sleepy :sleep:

Also, GUI badge already :p

Incidentally, on topic somehow, I think we can count on a basic setup of at least two "buttons" on just about any platform - a simple click (left click on a mouse, tap on a touch screen, any of many buttons on a console controller, fingers on motion) and an alternate (right click on mouse, extended press on a touch screen, other buttons/fingers on consoles/motion). That leaves good space for left click = normal + alternate = radial. But not necessarily two buttons and an alternate, be it frobbing, right click, mouse wheel, etc

Stuff like swiping, fancy motion, hot keys, and maybe just about everything else should be focused to be shortcuts to anything accessible through the main actions. Excepting probably movement, which can be something else (might get sketchy on touchscreen - swiping? gyroscope?)
 

overdhose

Active Member
Contributor
Design
World
GUI
sigh there goes all my hard work on the 13th icon to make a chest look like the other icons I salvaged. I understand your reasoning, but the idea behind this was just as an optimization process. Maybe we should consider a "pc" and "laptop" setup all together, where pc gets as many icons as they like (or possible) and laptop only gets 8. While I agree a zodiac can have 8 signs, it can also have 16 :p. The idea behind the radial was just to enable people to quickly open a fast access menu, and the default 4 (menu, frob, invent and craft) I don't think we can drop, ideally I'd need 2 for zoning after some thinking, so that leaves 2 spots and makes it very cramped again for anything beyond that.

Anyway, cheating a bit and simply making a circle with buttons I'll add this for a test run, prob link it to third mouse click to open or by equipping an item that triggers it. And that may be my escape route all together, for those who don't have buttons leave the equipped item as an alternative to open an 8 button layout, and propose a full 13 button (or configurable) setup for those who do have a mouse. As for the 8 button gui layout, that can still be done to, I don't see the radial interfering with it as it's functionality is completely different.
 
Top