|
|
|
|
|
|
|
I'm trying to make point-n-click adventure game in Realbasic...but problem..pls
|
|
| Author Name |
Status |
Posted Time |
| Dender Afukay |
|
5/4/2008 10:49:08 PM |
| Author is Offline |
|
Hi, I'm trying to make point-n-click adventure game in Realbasic, and I'm currently trying to implement a "menu" of sorts that pops up when you right click and hold(like in some LucasArts games, like Full Throttle). But I'm having some trouble, it seems like when Realbasic sees that it's a IsContextualClick, it fires the MouseUp event immediately after the MouseDown event :/ (What I'm doing now is that whenever MouseDown is fired, if IsContextualClick is true then I set a boolean variable called RightClick to true. When the MouseUp event is fired, RightClick is false. My other methods check this boolean variable and respond accordingly)
It works fine when I use Keyboard.AsyncControlKey instead of Rightclick(or, well, you have to use Control instead of right-clicking, but otherwise it works as I want it to).
Sorry if this message seems a little cryptic, it feels like I'm having a hard time explaining.
Anyone got any tips? Plugins?
(I wasn't sure if this or Games were the right place to post, sure, I'm making a game, but it's not really a game specific question, is it?)
BTW, I'm using RB2005r3 and Mac OS X 10.4.2
Thanks
|
|
|
| Subject |
Author |
Status |
Date |
Re: I'm trying to make point-n-click adventure gam e in Realbasic...but problem..pls
|
Yvonnet Vogel |
|
5/5/2008 4:17:46 AM |
That is exactly correct, once the mouse is held down on the Mac, we fire the MouseDown event and IsContextualClick is true. However, the newer way to tell when a contextual click has happened is via the ConstructContextualMenu event.
Quote: Anyone got any tips? Plugins?
Nothing off the top of my head, but that's because I'm not quite understanding the issue. When the right click originally happens is the proper time to fire the contextual menu; why do you need the delay?
Perhaps on right click you could start a timer, and in the action event, check to see if the mouse is still held down (via System.MouseDown) and no MouseUp events fired in-between.
Quote: (I wasn't sure if this or Games were the right place to post, sure, I'm making a game, but it's not really a game specific question, is it?)
Posting it here is just fine. Post Comments |
|
Re: I'll try
|
Dender Afukay |
|
5/5/2008 4:19:13 AM |
| Hmm, I'll try that.
My problem is this: "it fires the MouseUp event immediately after the MouseDown event". So on my MouseDown event, I check if IsContextualClick is true, and then I want to display my "menu" until the right mouse button is up, but it seems to fire the MouseUp event directly after that, even though the right mouse button is down. If I reverse the mouse buttons(in my code), everything works fine, but I want to make the player move with the left mouse button and display the menu with the right, not the other way around.
Post Comments |
|
Re: I see...
|
Yvonnet Vogel |
|
5/5/2008 4:20:31 AM |
Ah, I see, that could pose a problem then. However, I'm still confused why you want it on mouse up. For example, the Finder posts a contextual menu as soon as I right-click (if you ignore any paging delays). I could understand on Windows where that behavior is the norm, but on the Mac it seems like it might confuse users.
I'd give the Timer/System.MouseDown hack a try if you'd like. Post Comments |
|
Re: I don't want it to appear on the mouse up
|
Dender Afukay |
|
5/5/2008 4:21:36 AM |
No, I don't want it to appear on the mouse up, I want it to disappear on the mouse up(show it on MouseDown, and keep it there during MouseDrag etc, then when the user releases the button, I want the "menu" to disappear. This is normal(LucasArt) behavior in point and click adventure games), but since it fires the MouseUp event directly after the MouseDown event on right-clicks, it just pops up and disappears. Post Comments |
|
Re: I see what you're trying to accomplish now
|
Yvonnet Vogel |
|
5/5/2008 4:23:55 AM |
Ah, I see what you're trying to accomplish now. But how are you planning on dismissing the contextual menu? I didn't realize that there was a supported way of doing that.
>You may want to consider using Canvases to make your own skinned menu, then you can control it however you'd like. Post Comments |
|
Re: My menu is a custom made one
|
Dender Afukay |
|
5/5/2008 4:24:54 AM |
My menu is a custom made one, I'm not using the built in, therefore I have total control over it. Still haven't found a working solution to my problem though. Post Comments |
|
Re: Then it sounds like it's time for a bug report
|
Yvonnet Vogel |
|
5/5/2008 4:26:16 AM |
Then it sounds like it's time for a bug report, because the MouseUp should not be firing immediately after the MouseDown. I can't think of other ways to solve this issue.
>I'd file a bug report with a simple example that demonstrates the issue. I'd use Syste m.DebugLog to show when the events happen so that it removes all complexity from the issue. Post Comments |
|
|
|
|
|
|
|
|
No Related Articles |
|
|
|
|
|