Menu

Show posts

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 Menu

Messages - tierdal

#1
thanks works like a charm
#2
Coming back to the topic of Buttons...

I have this code and I'm looking for a way to simplify it but nothing comes to mind:
(what it does is it changes the font color to black as mouse moves over it and back to white when mouse moves away from it)

Code: AGS
/*=======================  Menu BUTTON SOUNDS & ANIMATION & COLOR  ============================ */  

  GUIControl *gc = GUIControl.GetAtScreenXY(mouse.x, mouse.y);
  Button *b;
  int IsOverButton = false;
  
  if (gc != null) b = gc.AsButton;
 
  if (b != old_button && b != null) { // mouse has just entered a button
    if (b.OwningGUI == gMainMenu) {
      //IsOverButton = true;                                                  //BUTTON SOUND
      aButton_16.Play();
    }  
  }
  
//Button Font Color Changer
  if (b == Main_NewGame) {
      Main_NewGame.TextColor = 0;
       Main_LoadGame.TextColor = 65535;
       Main_Options.TextColor = 65535;
       Main_Credits.TextColor = 65535;
       Main_Extras.TextColor = 65535;
       Main_Help.TextColor = 65535;
       Main_Exit.TextColor = 65535;
     } else if (b == Main_LoadGame) {
       Main_LoadGame.TextColor = 0;
       Main_NewGame.TextColor = 65535;
       Main_Options.TextColor = 65535;
       Main_Credits.TextColor = 65535;
       Main_Extras.TextColor = 65535;
       Main_Help.TextColor = 65535;
       Main_Exit.TextColor = 65535;
     } else if (b == Main_Options) {
       Main_Options.TextColor = 0;
       Main_NewGame.TextColor = 65535;
       Main_LoadGame.TextColor = 65535;
       Main_Credits.TextColor = 65535;
       Main_Extras.TextColor = 65535;
       Main_Help.TextColor = 65535;
       Main_Exit.TextColor = 65535;
     } else if (b == Main_Credits) {
       Main_Credits.TextColor = 0;
       Main_NewGame.TextColor = 65535;
       Main_LoadGame.TextColor = 65535;
       Main_Options.TextColor = 65535;
       Main_Extras.TextColor = 65535;
       Main_Help.TextColor = 65535;
       Main_Exit.TextColor = 65535;
     } else if (b == Main_Extras) {
       Main_Extras.TextColor = 0;
       Main_NewGame.TextColor = 65535;
       Main_LoadGame.TextColor = 65535;
       Main_Options.TextColor = 65535;
       Main_Credits.TextColor = 65535;
       Main_Help.TextColor = 65535;
       Main_Exit.TextColor = 65535;
     } else if (b == Main_Help) {
        Main_Help.TextColor = 0;
       Main_NewGame.TextColor = 65535;
       Main_LoadGame.TextColor = 65535;
       Main_Options.TextColor = 65535;
       Main_Credits.TextColor = 65535;
       Main_Extras.TextColor = 65535;
       Main_Exit.TextColor = 65535;
     } else if (b == Main_Exit) {
       Main_Exit.TextColor = 0;
       Main_NewGame.TextColor = 65535;
       Main_LoadGame.TextColor = 65535;
       Main_Options.TextColor = 65535;
       Main_Credits.TextColor = 65535;
       Main_Extras.TextColor = 65535;
       Main_Help.TextColor = 65535;
     } else {
       Main_NewGame.TextColor = 65535;
       Main_LoadGame.TextColor = 65535;
       Main_Options.TextColor = 65535;
       Main_Credits.TextColor = 65535;
       Main_Extras.TextColor = 65535;
       Main_Help.TextColor = 65535;
       Main_Exit.TextColor = 65535;  
     }
    
  old_button = b;
  //END BUTTON SOUNDS


EDIT: i tried doing a while loop and it crashed :(
#3
Quote from: Armageddon on Sun 19/05/2013 06:55:03
I missed the whole season, but Matt Smith left? WHAT!


no matt smith is renewed for season 8. Hurt is just going to be in the 50th anniversary with Temnant and Smith
#4
John Hurt is not the "new" doctor, well in timey wimey terms. He is the TRUE 9th, making matt smith the 12th instead of 11th. Hurt is that "secret" that was worth protecting, for something grand happened in that incarnation. so.. yea... headache
#5
kudos to you, good sir. works perfectly!
#6
Recruitment / Looking for Background Artist
Fri 17/05/2013 01:07:42
Hey whoever is reading this.

I know this looks just like 100 other posts out there, but it's a little different.

I can hand draw the backgrounds, however I cannot make them digitally. If someone is interested in taking my handdrawn backgrounds and remaking them digitally, your help would be appreciated.

A little bit about the game

Title: Low Orbit
Story: far away from Earth, looking for habitable planets circa 2093
        character wakes up with amnesia (i know, cliche) on a deserted ship
        goal is to find your way off the ship/figure out what happened.
       
This is a dark themed game (barely any humor), lot's mentality and darkness of the mind.


attached is an example of a background I drew...
Spoiler
[close]
#7
Thank you so much, however I have 2 new questions:

1. Is it possible to add sound to just one of the buttons or just to a certain GUI?

2. (I dont think there is a fix for this) but my menu buttons are stacked up in a column, and when I move mouse over them only 1 or 2 sounds play for the whole menu of 6 buttons, to hear the sound again i have to move mouse left or right from the GUI itself..
#8
Hi all! While making a main menu I came up to a small problem. Everything is fine BUT I cannot figure out how to Assign sound effects (like a little beep) to a Button within the GUI. I want it to be so where when I mouse over an Item on the menu, that sound is played. If you need more information, please let me know.
SMF spam blocked by CleanTalk