Right click

Started by , Mon 01/03/2004 18:18:47

Previous topic - Next topic

Rik Vargard

Is there a way to disable right click in a room? ???

Thanks  ;D

strazer

Put a on_mouse_click function in the room's script and write

if (button==RIGHT) ClaimEvent();

Read the help file on ClaimEvent to see what it does.

Rik Vargard

I found another solution thx to you:

I disable all other cursor modes!

Thx!!
;D

punkrebel

Can you explain me better how it works? maybe whit an example?

I want to disable in all room (so I think i'll put on global script).

tnx

Ishmael

Find on_mouse_click on the global script, and romove anything put between the braces in the

if (button==RIGHT) {

}

thingy...
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

punkrebel

I've done what you say, but if I click on the right-button the cursor still changin between two mode (now i don't remer that two mode is).

I want to do like the right-click doesn't exist..

Barbarian

#6
To disable right-clicking in specific rooms, add the following towards the top of that room's script file:

function on_mouse_click(int button)
{if (button==RIGHT) ClaimEvent();}


To disable for all rooms, I think from the global script, and under the
"function on_mouse_click(int button)" part, and where it reads:

else {Ã,  Ã, // right-click, so cycle cursor
SetNextCursorMode();Ã,  Ã, 
Ã,  }

You could simply remove the "SetNextCursorMode();" , so it would look like:

else {Ã,  Ã, // right-click, so cycle cursor
Ã,  }

Conan: "To crush your enemies, see them driven before you, and to hear the lamentation of the women!"
Mongol General: "That is good."

Blade of Rage: www.BladeOfRage.com

punkrebel

It's funny, i did what you told me and instead of don't change the cursor it show every cursor mode on the right click mouse

Scorpiorus

Could you elaborate a bit? What Barbarian said should do the trick. You can also try putting the following line at the very top of on_mouse_click:

function on_mouse_click(int button) {
if ((button==RIGHT) || (button==RIGHTINV)) return;
// rest of the script
...
...
}

SMF spam blocked by CleanTalk