
mfg
Black Knight
Code: Alles auswählen
else if (button == eMouseLeftInv) {
Mouse.UseModeGraphic(eModeLookat);
}
Code: Alles auswählen
Display("Funzt.");
Code: Alles auswählen
function on_mouse_click(int 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 == eMouseRight) {
if (GetCursorMode() == 4) SetCursorMode(0); //checks wether you use an inv.
else {if (zaehl2 >=1){InterfaceOn(3); SetCursorMode(2); SetMouseCursor(6); Wait(10); zaehl++;} }
// brings up a CMI-like inventory screen.
}
else if (button == eMouseLeft) { // left-clicking code
if (GetCursorMode() == 4) ProcessClick(mouse.x,mouse.y,4);
else { //these codes check wether you use an inventory or not..
clicked = 1; //we trigger the calculating
mousex = mouse.x; //we set these params to store the exact location of
mousey = mouse.y; //where you clicked...
guix = mousex - 25; //and we set the whereabout's for the GUI... and to
guiy = mousey - 25; //center the GUI, we'll remove 25 (see below)...
if (guix < 0) guix = 0; if (guix > 269) guix = 269;
if (guiy < 0) guiy = 0; if (guiy > 149) guiy = 149;
//Now we'll check these so the verbcoin won't appear to close to
//the edges. If not altered, it may be impossible to select certain
//commands! Why these numbers? Well, the GUI is exactly 50x50, which...
//(NOTATE: the GUI is 50x50, not the graphic. That's why the GUI never will be
//displayed without some space to the screen edge!!!)
//...means that to center it by our clicks, it must be set to the mouse
//coordinates - 25... AND, since AGS first coord. is (0,0), you
//subtract 1 from the values. Also, as all other things, it spawns from
//the top-right corner, so in the top and left side, well simply put it
//close as possible ie. 0. On the other side, well take the largest value
//(which is 319) and subtract 50 (the size of the GUI) and the equalent
//from the bottom (199-50)
}
}
else if (button == eMouseLeftInv) {
cEgo.Say("Es geht!!");
}
}
Code: Alles auswählen
function on_mouse_click(MouseButton button) {
...
Code: Alles auswählen
if (IsGamePaused() == 1 && gInventory.Visible == false) {
// Game is paused, so do nothing (ie. don't allow mouse click)
}