Learn to look before posting please.
[QUOTE=tricxta;97982]
Other useful showimg operations associated with creation of guis:
In addition to showimg index,image,x,y;
-Crop pictures:changeimgpart index,startX,startY,width,height
-Show an animation:showani index,x,y,direction,gani,params;
–params can then be referred to within the gani(parameter numbers can range from 0-4)
—gani script:#p(0)
—in the gani editor:PARAM0
-overlay/change image layering:changeimgvis index,layer;4
–4+ use screen-coordinates, 0-3 are tile coordinates
Mouse operations:
-If (mousedown){
–will be true if the user clicks any button on their mouse, no loop of any sort is required
-if (mousewheel){
–this function is coupled with mousewheeldelta and is very useful for scrolling
This is for all future scripters not sure on how to create a gui
An example gui is:
if (playerenters){
showimg 300,plant.png,screenwidth/2,screenheight/2;
changeimgvis 300,4;
}
if (mousedown && mousescreenx in |screenwidth/2,screenwidth/2+32| && mousescreeny in |screenheight/2,screenheight/2+32|){
message you clicked it!;
}
[/QUOTE]
@twiggy
leftmousebutton requires constant checking in a loop and isn’t exactly ideal for guis. Although if you were to make custom commands like mouseReleased you’d definately use that.
A thing I failed to mention is mousedown also provides with it information in #p(0) which says exactly what button was pressed.
Example:
if (mousedown){
if (strequals(#p(0),left)){
}
}