| Home Page | Recent Changes | Preferences


UWindowBase >> UWindowList >> UMenuModMenuItem

Used to create the items of UT's Mod menu.

To add a new item to the Mod menu create an INT file with the following lines in it:

 Object=(Name=MyModPkg.MyModMenuItem,Class=Class,MetaClass=UMenu.UMenuModMenuItem,Description="&My Mod,This text goes on the status bar")

This creates a new entry in the Mod menu labled "My Mod". (The & in the name declares the next character as shortcut key.)


localized string MenuCaption
localized string MenuHelp
These variables are used only if the Description part of the INT file declaration is missing.
UWindowPulldownMenuItem MenuItem
This is used internally by the Mod menu and is a reference to the real menu item.


function Setup ( )
Called to set up the appearance of the MenuItem.
When the Description part of the declaration in the INT file is missing this function will be called when UT's menus are set up, but it will not have a possibility to access the menu item created for this mod.
This function will also be called when the menu item is executed. In this case MenuItem points to the menu item representing this mod in the Mod menu.
function Execute ( )
Called right after the Setup function when the menu item is executed. Put any relevant code in this function.
Usually this function will only create a configuration window:
function Execute()
    MenuItem.Owner.Root.CreateWindow(Class'MyModPkg.MyUWindowFramedWindow', 20, 20, 200, 200);

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands


Mapping Topics

Mapping Lessons

UnrealEd Interface


Scripting Topics

Scripting Lessons

Making Mods

Class Tree


Modeling Topics


Log In