Disable Mouse Right-Clicks

Started by Arjunaz78, Tue 11/10/2011 22:36:10

Previous topic - Next topic

Arjunaz78

I've follow the AGS Editor tutorial/guide about disabling right click mouse option at http://americangirlscouts.org/agswiki/ but i can't get through it because it's absolutely confusing me.Besides the wiki just guiding the old version of AGS Editor. (v2.7) instead of AGS Editor v3.2.1 that i currently using.

Basically i just create a game with the room that include the object and then the customise GUI's menu option interface like 'view intro' & 'start game' but i hardly to make the right click disable because the GUI's properties tool directly open the script on GlobalScript that i can't edit with 'claimevent' function,besides i already disabling the right click in other room,it's work perfectly,but howabout disabling it on GUI's unless it can't be done by using 'claimevent' on GlobalScript instead of room script?

I want too to make it's disable throughout the entire game too..but i only found just 1 function that include 'right click' on GlobalScript that i must to delete it (refer to http://americangirlscouts.org/agswiki/) well it's seems nothing happen even before & after i delete it..otherwise,how can i enable it back again after i disable it?

THX.
..In the making of Silent Hill: The Hospital..

https://www.facebook.com/ArjunazGamesStudio

pcj

Quote from: Arjunaz78 on Tue 11/10/2011 22:36:10
I've follow the AGS Editor tutorial/guide about disabling right click mouse option at http://americangirlscouts.org/agswiki/ but i can't get through it because it's absolutely confusing me.Besides the wiki just guiding the old version of AGS Editor. (v2.7) instead of AGS Editor v3.2.1 that i currently using.

The 2.7+ code is the same for 3.2.1.  I'm having trouble understanding the rest of your post...
Space Quest: Vohaul Strikes Back is now available to download!

Khris

If you want a GUI button to react only to a left click, do this:

Code: ags
function button_OnClick(...) {

  if (button != eMouseLeft) return;   //  <-- Add this line at the start

  ...
}


Regarding disabling right clicks during the game, it depends on what exactly you want.
The default right click behavior is to switch to the next cursor mode. If your game only has one cursor, the best solution is to disable all the other cursors by changing their "Standard cursor mode" property to false.

SMF spam blocked by CleanTalk