SUGGESTION: eMouseMiddleInv (SOLVED)

Started by TerranRich, Wed 24/06/2009 18:10:53

Previous topic - Next topic

TerranRich

I was designing the GUI for my game in progress, and to my horror and shock I saw that there was no eMouseMiddleInv mouse button state! I can middle-click objects, hotspots, and characters, but not inventory items. Would it be too much trouble to include this in a future version of AGS? Pretty please? :)
Status: Trying to come up with some ideas...

monkey0506

When you say you can "middle-click objects"...you mean that you are actually clicking the mouse-wheel and it's registering a mouse-click? Because if so I'd be interested what MouseButton is getting passed through...

Anyway, a eMouseWheelClick[Inv] mode could be useful if someone really needs it for their game, sure.

GuyAwesome

#2
Clicking the mouse wheel counts as eMouseMiddle, for me at least.
On a semi-related note, is there a reason Mouse.IsButtonDown doesn't work for eMouseMiddle? I don't have any particular need for it to, so this isn't a request as such, but I just realised it didn't and it struck me as odd.

TerranRich

In the page you linked to, monkey_05_06, it shows "eMouseMiddle" as one of the enumerated values.

I found a workaround, but still, it shouldn't be that difficult to implement, should it? Now that three-button mouses are pretty much commonplace, there should be more support for it.
Status: Trying to come up with some ideas...

GuyAwesome

#4
OK, I was playing around with this, and: it looks like if( button == 7) IS eMouseMiddleInv, it just doesn't have an enum value... At least
Code: ags

if (button == 7) Display("eMouseMiddleInv is real!");


Does what you'd expect, when I middle click an InvItem. Can anyone else confirm this? Am I hallucinating, or is it just not officially supported, or something?

I did a Display line to show the numeric values of the MouseButton enum, and 4 and 7 were missing. I.e.
Quote
enum MouseButton {
  eMouseLeft = 1,
  eMouseRight = 2,
  eMouseMiddle = 3,
  eMouseLeftInv = 5,
  eMouseRightInv = 6,
  eMouseWheelNorth = 8,
  eMouseWheelSouth = 9
};

Haven't found out what 4 does, mind you.

monkey0506

Quote from: TerranRich on Wed 24/06/2009 20:05:00In the page you linked to, monkey_05_06, it shows "eMouseMiddle" as one of the enumerated values.

Oh crap! :-[

I don't know how I overlooked that....

TerranRich

Well that's very weird. I wonder what #4 does. Hmm...

Thanks, GuyAwesome! Perhaps CJ should (AHEM) update the enum specification in AGS. ;)
Status: Trying to come up with some ideas...

Shane 'ProgZmax' Stevens

More polling versatility is always welcome.

Vince Twelve

Quote from: TerranRich on Wed 24/06/2009 20:05:00Now that three-button mouses are pretty much commonplace, there should be more support for it.

Just make sure that the middle mouse button isn't necessary to play your game, or that there's another button (spacebar?) that you can use in it's place for players who are using laptops to play the game (or the rare people who don't have middle buttons on their mouse)!  Don't want to alienate too many players, right?

Shane 'ProgZmax' Stevens

Don't most laptops have a middle mouse button next to the pad as well, now?  I seem to remember seeing them, and if not, I think they're behind the times.

Gilbert

I'm always against the idea of trying to make the middle button or a mouse wheel madatory for the control scheme of any software though. It's okay if it's an option for supposely better controls but it should not be a necessity. I just couldn't see how and why this button/wheel would be considered a standard for everyone.

Khris

Quote from: Gilbet V7000a on Thu 25/06/2009 16:34:24I just couldn't see how and why this button/wheel would be considered a standard for everyone.
I guess the same was once said about CD drives or displays with more than two colors... ;)

TerranRich

#12
I completely forgot about laptop users (even thought I was one myself for many years), so I have the spacebar map to do the same thing as the middle button. Having three interactions (walk/talk/look or walk/interact/look) was necessary if I wanted the player to be able to click on a non-walkable-area and still walk somewhere (the closest point on the walkable area to the target), as well as be able to look at objects/hotspots/characters, and interact (with objects/hotspots) or talk (with characters). Spacebar will double as the middle button, covering interact/talk.
Status: Trying to come up with some ideas...

Pumaman

This sounds like a reasonable suggestion, I'll look into it for a future version.

TerranRich

Chris... what does mode #7 do? Perhaps just defining #4 and #7 with a name (like eMouseMiddleInv) will be all that's needed.
Status: Trying to come up with some ideas...

Ryan Timothy B

Quote from: GuyAwesome on Wed 24/06/2009 19:02:43
On a semi-related note, is there a reason Mouse.IsButtonDown doesn't work for eMouseMiddle?

Has this been added on the AGS beta?
I have a purpose for IsbuttonDown(eMiddleMouse), so I was mainly curious.  It's for a non-adventure game. The middle mouse isn't for anything serious, just for scrolling while held down, but it would be nice to have. :P

Pumaman

eMouseMiddleInv has been added to the beta, IsButtonDown(eMiddleMouse) has not but I will try to squeeze it in before the Final.

TerranRich

Sweet! (Although I changed my system around so that middle-clicks aren't even used anymore.) :P
Status: Trying to come up with some ideas...

monkey0506

Although it's reasonable to assume that most users will have a mouse-wheel, I'd also just like to add my support to the idea that there should be at least an alternate method of performing the same function. The reason being that although I have a mouse-wheel, my $20 mouse is a piece of crap. I've updated the drivers a million times and done everything I can possibly think of (right down to beating the hell out of the mouse itself) and it still does the same thing. At completely random times the mouse-wheel decides it wants to start screwing with me and incessantly scrolls the page I'm on up and down (at random) until finally I get tired of it and just get off the computer.

I actually resolved it by disabling the mouse-wheel altogether. Sucks coz now I have to manually scroll, but it's 100% better than the alternative.

TerranRich

My plan was originally going to have the spacebar do the same thing as the middle-button... eventually I would've had three keyboard shortcuts for each of the three mouse buttons, just in case somebody wanted that option.
Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk