A Delphine Interface - How?

Started by Beast, Tue 08/07/2003 12:09:27

Previous topic - Next topic

Beast

Who remembers Future Wars? Because I do, and I like that interface.

Hence my problem. I've created a nice little GUI, with some pretty little buttons (etc. etc.), but when attempting to get it to pop up when I click the right mouse button, I have failed miserably. It comes up straight away when I 'Test Game' and won't go away. It's frustarting. I've scoured [sic] the help file looking for a relevant scripting commands, but haven't been able to find one. I managed to fudge this:

function on_mouse_click(int button) {
  if (IsGamePaused() == 1) {
  }
 else if (button==LEFT) {
   ProcessClick(mouse.x, mouse.y, MODE_WALK);
 }
 else {  
   GUIOn(3);
 }
}

But it didn't really work. It kind of needs some tweaking anyway, but just getting it to go semi-properly first would be great!

In short hand, I want my GUI to pop up when I click the right mouse button somewhere on the screen. And I'd like it to go away, leaving a nice clear screen, when I don't want it.

Cheers in advance for your help.

Gilbert

I don't know how the Future Wars GUI's like. But if you want to close the GUI just use GUIOff().

I don't know how you want to close it, you may add a button on the GUI and set it to "script only" then put the code there. Or if you want to close it by just right-clicking, just do:

function on_mouse_click(int button) {
if (IsGamePaused() == 1) {
if (button==RIGHT) GUIOff(3);
}
else if (button==LEFT) {
ProcessClick(mouse.x, mouse.y, MODE_WALK);
}
else {
GUIOn(3);
}
}

The code, of course, may need some tweaking, but hope that gives you some idea.

Scorpiorus

#2
...then also you need to go to the GUI editor and mark that gui as a Popup modal.

EDIT:
Oh, Gilbert, I just have noticed you pointed it out. Sorry.

Btw, Beast, the Script only and Popup Modal are identical options. Script only was renamed to Popup modal to avoid confusion since AGS2.55. Just for reference.

-Cheers

animatty


AndersM

#4
Quote from: animatty on Mon 21/07/2003 15:15:21
What's a delphine Interface?

In Futurewars Delphine used a text-based interface: You execcuted everything with the left mousebutton, and by pressing the right one you activated a list of commands, such as 'Look at', 'Operate', 'Talk to', 'Inventory' and so on. If you for example pressed 'Inventory'  the list changed to the inventory-list and so on....

SMF spam blocked by CleanTalk