PDA

View Full Version : Creating a button in mutator settings...?


GlassBoy
26th Jun 2004, 10:26 PM
I want to put a clickable button in my mutator config options that opens up a window that can display text across it, with a scrollbar at the side. Basically a help window.

However, i have very little idea how to pursue this type of coding feat, and don't know where to look in wiki or UDN.

Anyone know how to do this?

Heywood
26th Jun 2004, 11:26 PM
You'ld need at least 3 classes


class MyModKeys extends GUIUserKeyBinding;

defaultproperties
{
KeyData[0] = (KeyLabel="MyMod",bIsSection=True);
KeyData[1] = (KeyLabel="MyMod Help Window",Alias="MyMod_help");
}


Then in your mutator's interaction (assuming you have one otherwise you could put yout exec function somewhere else)


exec function MyMod_help()
{
ViewportOwner.Actor.ClientOpenMenu("MyMod.MyModHelpPage");
}



class MyModHelpPage extends GUIPage;

// read up on GUIPage on the wiki or seach these or atari coding forums for stuff about that


You'll need to create a .int file manually for your mod - unfortunately ucc dumpint and .ucl files don't appear to hold the stuff require to let UT2004 know that there are keybinds that need work with

MyMod.int would probably be this (assuming MutMyMod is your mutator class)

[Public]
Object=(Name=MyMod.MutMyMod,Class=Class,MetaClass=Engine.Mutator,Description="My fabulous Mod")
Object=(Class=class,MetaClass=Xinterface.GUIUserKeyBinding,Name=MyMod.MyModKeys)

Heywood
27th Jun 2004, 12:35 AM
Hmm - re-reading your requirement - is this in the mutator configuration options - IE what is seen server-side before the game gets started (in which case what I gave you is wrong) or client-side?

GlassBoy
27th Jun 2004, 10:29 AM
Hmm - re-reading your requirement - is this in the mutator configuration options - IE what is seen server-side before the game gets started (in which case what I gave you is wrong) or client-side?

Server Side, But the information you just gave me may still be helpful to me later on. I imagine that there will be a bunch of clients that join the servers hosting this mutator, and not knowing what the heck to expect with the weapons i've modified.

But yes, I do want to know how to make a clickable button in the mutator config options menu, so that when it opens up, a helpful window that can display text appears, with a scrollbar to the right side.

MKhaos7
27th Jun 2004, 11:10 AM
Server Side, But the information you just gave me may still be helpful to me later on. I imagine that there will be a bunch of clients that join the servers hosting this mutator, and not knowing what the heck to expect with the weapons i've modified.

But yes, I do want to know how to make a clickable button in the mutator config options menu, so that when it opens up, a helpful window that can display text appears, with a scrollbar to the right side.

I'm not sure of what you want, since after the server has started the users that will connect to it won't be able to load the screen from the mutator config...

But any ways, there is a way to make you open a window in the mutator config screen.
Take a look at http://wiki.beyondunreal.com/wiki/Mutator_Config_GUI_(UT2003)

I've also implemented a separed configuration window in my mutator (see my sig), you might want to take a look at it. If thats what you want :)