Mouse mode problem: Not showing

Started by Slasher, Wed 05/06/2013 14:43:26

Previous topic - Next topic

Slasher

Hi

I'm not sure what is causing this problem, things are generally ok.

It got to a point where I imported a fresh global, no changes what-so-ever. My room opens with a splash gui.

I did have it to just show interact and after when the splash screen was closed employ the rest of the modes. But none of the mouse modes worked.

When I did the above (import new global) and played the game again, I just got the walk mode, no other modes.

The room / global script has no references to mouse modes enable/disable.

Any ideas what the problem may be?

That appears to be the problem. Is there a work-around to allow mouse mode interacting with the transparent center area of the screen? 

Think view of a cockpit with window and controls.

EDIT: I have a full screen GUI with a transparent center. Obviuously it's clickable as it has buttons and stuff on therefore it is clickable.

Would it be better to make 4 individual gui's: Top, Bottom, Left and Right?


cheers




st.

#1
Hi
I hope that your problem didn't annoy you too much because my answers may sound silly - obviously I didn't understand exactly what the matter is( and I'm not too knowledgeable about programming either ). Anyway here goes nothing:

Concerning the transparent area of the screen - the GUI is displayed on the background of a room, so if it is a special room - ment only to hold the GUI - why not define a hotspot in the center( or wherever you need mouse interaction outside the GUI )?

Concerning the mouse cursor not showing - are you not using the simple  mouse.Mode = eModeInteract  in the GUI-room's  room_AfterFadeIn  function ?
springthoughts

Slasher


Lewis

#3
I don't know a lot about the context for this, but it sounds somewhat like you're over-complicating it. I would say the single GUI is the way to go.

Make the GUI visible on room load, and invisible on room leave (or whatever other condition you'd like to use to get call/get rid of the GUI).

Then, in the global script, put this in repeatedly_execute_always:

Code: AGS
if (GUINAME.Visible == true) {
    mouse.Mode=eModeInteract
    }


That way it'll ensure the mouse is always in 'interact' mode when the GUI is visible, and revert to whatever it was before when it's not.

If this still doesn't work, the problem is likely with some mouse script you've written elsewhere, rather than to do with the GUI.

EDIT: Wait - sorry, maybe I misunderstood. Did you mean your issue is that you want a different mouse mode in the transparent bit to in the opaque bits?

If so, you could probably do this with screen coordinates, but yes, splitting the GUI into multiple different ones is probably the easiest way.
Returning to AGS after a hiatus. Co-director of Richard & Alice and The Charnel House Trilogy.

Khris

Just for reference, I believe the problem was that with a GUI that is set to be clickable, even the fully transparent parts will catch mouse clicks.
The bit about mouse modes was confusing but not really relevant I guess.

Slasher

Although I have done this in a different way I just want to make the point that whilst having a room sized GUI with the middle bit transparent, which is the 'Room' as it were, therefore both the GUI and Room have to be clickable.

SMF spam blocked by CleanTalk