Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Tornado

#1
Hmm, yet another problem. The cursor state does not change when right-clicking as the GUI is open. Is it possible that my conditional statement in the repeatedly_execute function, is blocking the on_mouse_click function?

Code: ags
function on_mouse_click(MouseButton button) // called when a mouse button is clicked. button is either LEFT or RIGHT
{
  if (IsGamePaused() == 1) // Game is paused, so do nothing (ie. don't allow mouse click)
  {
  }
  else if (button == eMouseLeft) 
  {
    ProcessClick(mouse.x,mouse.y, mouse.Mode);
  }
  else // right-click, so cycle cursor
  {   
    mouse.SelectNextMode();
  }
}
#2
Quote from: Snarky on Sun 03/05/2015 12:42:32
Try changing it to "Normal (initially off)" under the GUI properties.

I had "When mouse moves to top of screen" selected for my GUI Visibility property. Apparently this makes it a modal dialog. I did just what you said and also added the following code to my GlobalScript:

Code: ags

function repeatedly_execute() 
{
  if (mouse.y < 24)
  {
    gMenu.Visible = true;
  }
  else
  {
    gMenu.Visible = false;
  }
}


Both problems solved! The game does not pause and the cursors behaviour is unaffected by the GUI.
Thanks a lot.
#3
Hello. My first game in AGS is slowly taking shape.

I have made a custom GUI that pops up at the top of the screen when the mouse cursor is entering that area. The GUI is basically a horisontal bar. Its main portion contains my inventory, and a button for settings can be found to the far right. Now, what happens is that the Cursor automatically changes to type 6:Pointer, as this GUI becomes visible. Is there a way to prevent this from happening? The normal procedure is that the cursor modes are cycled one step every time I press the right mouse button, and I would like to keep this behaviour for my GUI as well.

I read in the online-manual, in Tutorial / Setting up the game / Cursors, that the Mode 6 (Pointer) cursor is used whenever a modal dialog is displayed (ie. a GUI that pauses the game). What is a "modal dialog" exactly? Is there a non-modal dialog? Perhaps just poor English on my part. I simply don't understand what is meant by this. Can I somehow operate my inventory GUI while the game is running in the background (i.e. not paused)?
SMF spam blocked by CleanTalk