Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Selecting an image (https://forums.graalonline.com/forums/showthread.php?t=64204)

xXziroXx 02-19-2006 03:35 AM

Selecting an image
 
How can I make so, say, upon clicking once on an image it sets players chat to "lol!"?


Here“s what I tried:


NPC Code:

new GuiShowImgCtrl("x_ShowImg_1"){
x = 10, y = 10;
image = "block.png";
}



and further down...

NPC Code:

function x_ShowImg_1.onSelected()
{
player.chat = "lol!";
}




I have no clue if you can check a ShowImgCtrl at all, and if not; what should I use?

Ajira 02-19-2006 04:26 AM

function ctrlname.onMouseDown(mcount, mx, my, modifier)
I think that's the right params, forgot =x

Rick 02-19-2006 08:18 AM

You could also use GuiBitmapButtonCtrl if you want a bitmap as a button.


All times are GMT +2. The time now is 10:23 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.