This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuoteitem is always added in the first new empty slot
//-------QUIT MENU----------------
if (interface == QUITM) {
if (button == 0) {
QuitGame(0);
}
if (button == 1) {
GUIOff(2);
UnPauseGame();
}
}
//--------START MENU BUTTONS ------------
if (interface == MENUBUTT) {
if (button == 0) {
GUIOn(4);
Wait(20);
GUIOn(5);
Wait(23);
GUIOff(5);
GUIOn(6);
Wait(20);
GUIOff(3);
GUIOff(4);
GUIOff(5);
GUIOff(6);
GUIOff(7);
NewRoom(4);
}
else if (button == 1) // load game
RestoreGameDialog();
else if (button == 2) // quit
QuitGame(1);
}
//------------HUD-----------------
if ((interface == HUD) && (IsGUIOn(2) ==0)){
if ((button == 1) && (IsGUIOn(9) ==0)) {
GUIOn(9);
}
else if ((button == 1) && (IsGUIOn(9) ==1)) {
GUIOff(9);
}
if (button == 6){
GUIOn(0);
}
if (button == 7){
GUIOn(1);
}
if ((button == 3) && (game.top_inv_item < game.num_inv_items - game.num_inv_displayed))
game.top_inv_item = game.top_inv_item + (game.num_inv_displayed/2);
if ((button == 4) && (game.top_inv_item > 0))
game.top_inv_item = game.top_inv_item - (game.num_inv_displayed/2);
}
//-----------RADIO HUD-----------------
if ((interface == HUDRADIO) && (IsGUIOn(2) ==0)) {
if (button == 0) {
SetCharacterView (JACK,4);
SetCharacterSpeechView(JACK,5);
AnimateCharacter(JACK,1,5,0);
Wait(25);
SetCharacterView (JACK,5);
Wait(16);
GUIOn(10);
RunDialog(0); }
if (button == 1) {
SetCharacterView (JACK,4);
SetCharacterSpeechView(JACK,5);
AnimateCharacter(JACK,1,5,0);
Wait(25);
SetCharacterView (JACK,5);
Wait(16);
GUIOn(10);
RunDialog(1); }
if (button == 2) {
SetCharacterView (JACK,4);
SetCharacterSpeechView(JACK,5);
AnimateCharacter(JACK,1,5,0);
Wait(25);
SetCharacterView (JACK,5);
Wait(16);
GUIOn(10);
RunDialog(2); }
}
//-----------------------------------------------------
// Restore game GUI
//-----------------------------------------------------
if (interface == LOADA) {
if (button ==2) GUIOff(LOADA); //cancel
if (button ==1){ //click on listbox item
int index = ListBoxGetSelected(LOADA,1);
if (GetSaveSlotDescription(index+100,buffer)==1){ //if there is a savegame here
GUIOff(LOADA);
RestoreGameSlot(index+100);
}
}
if (button == 3){ //scroll up
if (GStopsaveitem<5) GStopsaveitem=0;
else GStopsaveitem-=5;
ListBoxSetTopItem(LOADA,1,GStopsaveitem);
}
if (button == 4 && GStopsaveitem<90) //scroll down
GStopsaveitem+=5;
ListBoxSetTopItem(LOADA,1,GStopsaveitem);
}
//-----------------------------------------------------
// Save game GUI
//-----------------------------------------------------
if (interface == SAVEA){
int index=ListBoxGetSelected(SAVEA,1);
if (button == 3){//cancel
GUIOff(SAVEA);
GUIOff(SAVETEXTBOX);
}
if (button == 1){ //click on listbox
int stbypos;
StrFormat(buffer,"%d.",index+1);
SetLabelText(SAVETEXTBOX,1,buffer);
if (GetSaveSlotDescription(index+100,buffer)==0) StrCopy(buffer,"");//GetSaveSlotDescription(index+100,buffer);
//else StrCopy(buffer,"");
SetTextBoxText(SAVETEXTBOX,0,buffer);
stbypos=28+((index-GStopsaveitem)*(DEFAULT_FONT_HEIGHT+2)); //28 is set by trial-error. Deppends of the savegames listbox position
if (index<9) SetGUIObjectPosition(SAVETEXTBOX, 0, 12, 0);
else SetGUIObjectPosition(SAVETEXTBOX, 0, 18, 0);
SetGUIPosition(SAVETEXTBOX,29,stbypos);// 29 is set by trial-error. Same as above.
GUIOn(SAVETEXTBOX);
}
if (button == 2 && index>=0) { //save
GetTextBoxText(SAVETEXTBOX,0,buffer);
GUIOff(SAVEA);
GUIOff(SAVETEXTBOX);
SaveGameSlot(index+100,buffer);
}
if (button == 4){// scroll up
GUIOff(SAVETEXTBOX);
ListBoxSetSelected(SAVEA,1,-1);
if (GStopsaveitem<5) GStopsaveitem=0;
else GStopsaveitem-=5;
ListBoxSetTopItem(SAVEA,1,GStopsaveitem);
}
if (button == 5 && GStopsaveitem<90){ //scroll down
GUIOff(SAVETEXTBOX);
ListBoxSetSelected(SAVEA,1,-1);
GStopsaveitem+=5;
ListBoxSetTopItem(SAVEA,1,GStopsaveitem);
}
}
if (interface == SAVETEXTBOX){
int index=ListBoxGetSelected(SAVEA,1);
if (button == 0){
GetTextBoxText(SAVETEXTBOX,0,buffer);
GUIOff(SAVEA);
GUIOff(SAVETEXTBOX);
SaveGameSlot(index+100,buffer);
}
if (IsButtonDown(RIGHT)) GUIOff(SAVETEXTBOX);
}
//-----------------------------------------------------
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.076 seconds with 14 queries.