Page 1 of 1

Menu help please!

PostPosted: Sun Sep 17, 2006 3:12 pm
by relaxis
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....?

PostPosted: Sun Sep 17, 2006 4:06 pm
by Game A Gogo
use the mouse enter/leave and then change the transparant

PostPosted: Sun Sep 17, 2006 4:31 pm
by relaxis
I'm creating the game for the GP2X, it has no mouse.

PostPosted: Sun Sep 17, 2006 4:59 pm
by Game A Gogo
oh, sorry i forgot :oops:

PostPosted: Mon Sep 18, 2006 11:48 am
by relaxis
Can someone please help me? hello?

PostPosted: Mon Sep 18, 2006 12:14 pm
by makslane
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;
}

PostPosted: Mon Sep 18, 2006 4:26 pm
by relaxis
ok, but how do I create an integer variable? I get bug errors all over the place when i used your code...

PostPosted: Mon Sep 18, 2006 4:41 pm
by makslane
Use the Variables button in the Script Editor

PostPosted: Fri Oct 27, 2006 3:33 pm
by robin.deman
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.