Menu help please!

Game Editor comments and discussion.

Menu help please!

Postby relaxis » Sun Sep 17, 2006 3:12 pm

Can someone provide me with code to create a menu based on text actors, when the focus is on an option, the text goes opaque, otherwise it goes 50% transparent....?
User avatar
relaxis
 
Posts: 82
Joined: Mon Jul 17, 2006 2:06 pm
Location: Luxembourg
Score: 1 Give a positive score

Postby Game A Gogo » Sun Sep 17, 2006 4:06 pm

use the mouse enter/leave and then change the transparant
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby relaxis » Sun Sep 17, 2006 4:31 pm

I'm creating the game for the GP2X, it has no mouse.
User avatar
relaxis
 
Posts: 82
Joined: Mon Jul 17, 2006 2:06 pm
Location: Luxembourg
Score: 1 Give a positive score

Postby Game A Gogo » Sun Sep 17, 2006 4:59 pm

oh, sorry i forgot :oops:
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby relaxis » Mon Sep 18, 2006 11:48 am

Can someone please help me? hello?
User avatar
relaxis
 
Posts: 82
Joined: Mon Jul 17, 2006 2:06 pm
Location: Luxembourg
Score: 1 Give a positive score

Postby makslane » Mon Sep 18, 2006 12:14 pm

You need to create a integer variable (like focus) and change the transparency of the actor based on the focus variable.
Some thing like this:

On Key Down event for the key Down:

Code: Select all
focus++;
if(focus > 2) focus = 1;

switch(focus)
{
case 1:
  button1.transp = 0; //opaque
  button2.transp = .5; //transparent
  break;

case 2:
  button1.transp = .5;
  button2.transp = 0;
  break;
}
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby relaxis » Mon Sep 18, 2006 4:26 pm

ok, but how do I create an integer variable? I get bug errors all over the place when i used your code...
User avatar
relaxis
 
Posts: 82
Joined: Mon Jul 17, 2006 2:06 pm
Location: Luxembourg
Score: 1 Give a positive score

Postby makslane » Mon Sep 18, 2006 4:41 pm

Use the Variables button in the Script Editor
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby robin.deman » Fri Oct 27, 2006 3:33 pm

I used 4 different animations, example:

See the middle image:
Image

I used 4 animations, i used in every animation all the options and 1 highlighted.
With an Keydown event such as "up", it changes animation to the top option, than i made an keydown with "up" and "enter" (in that order) and it loads the game.

This i also did for the other options and just change animation and i've got a little menu.
User avatar
robin.deman
 
Posts: 70
Joined: Sat Nov 12, 2005 9:50 am
Location: Netherlands
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest