Game Development Community

Menu Bar

by Matthew Plant · in Game Design and Creative Issues · 06/10/2008 (8:06 pm) · 4 replies

How do i change the image of a menu bar?

#1
06/10/2008 (11:38 pm)
To change the image of a menu bar i believe you just modify the image in the default profiles. Then reload the project. You can then change the profile using the gui editor.
#2
06/11/2008 (2:21 pm)
Im new to this kind of stuff, What profile should i change it to?
#3
06/11/2008 (5:46 pm)
1. Open your common/gui/profiles.cs file. Find this entry:

if(!isObject(GuiMenuBarProfile)) new GuiControlProfile (GuiMenuBarProfile)
{
fontType = "Arial";
fontSize = 15;
opaque = true;
fillColor = "239 237 222";
fillColorHL = "102 153 204";
borderColor = "138 134 122";
borderColorHL = "0 51 153";
border = 5;
fontColor = "0 0 0";
fontColorHL = "255 255 255";
fontColorNA = "128 128 128";
fixedExtent = true;
justify = "center";
canKeyFocus = false;
mouseOverSelected = true;
bitmap = "./images/menu";
hasBitmapArray = true;
};

You probably want the old profile, so copy and paste it and change this line:

if(!isObject(GuiMenuBarProfile)) new GuiControlProfile (GuiMenuBarProfile)

To the following:

if(!isObject(GuiMenuBarProfileSpecial)) new GuiControlProfile (GuiMenuBarProfileSpecial)

Change this line:

bitmap = "./images/menu";

to this:

bitmap = "./images/menuSpecial";

Make any other changes you want to the menu.

2. Open the common/gui/images folder. Copy the existing menu.png to menuSpecial.png.

Make any changes you want to it. Be careful to keep the images the same size as the ones in it.

3. Reload the TGB project by exiting and restarting.

4. Now open then the gui editor, drop a menubar onto the image. Then change the profile by selecting under the rollout. This will change you gui component to you custom design.
#4
06/11/2008 (5:52 pm)
K thanks