Extending MainMenu

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

nfactorial

New Member
Oct 17, 2003
10
0
0
I'm trying to customize the menus in the runtime, to start with I just want to amend the current menu system. First attempt was to create a 'MyTestMainMenu.uc' file and declare my class:

class MyTestMainMenu extends MainMenu;

But ucc gives me the following:

Warning: Failed to load '..\GUIRes\TestMod.u': Can't find file '..\GUIRes\TestMod.u'
Critical: appError called:
Critical: Assertion failed: FriendlyName!=NAME_None [File:.\UnClass.cpp] [Line: 679]

I've tried adding a 'FriendlyName' string (and define it in the defaultproperties) but I still get the above. :(

Does anyone have any pointers, It's probably a noob error as I'm only a night old with unrealscript.

Thanks,
n!
 

nfactorial

New Member
Oct 17, 2003
10
0
0
Hiya,
Not sure what you mean, my entire 'MyTestMainMenu' consists looks like:

class MyTestMainMenu extends MainMenu;

That's it :) I just wanted to get it compiling so I could start modifying it. Although my first attempt changed a default property:

defaultproperties
{
VideoTabHint="I've Changed this string for no-good reason"
}

But that didn't compile, so I reduced it to just the class declaration to get it as simple as possible.

Thanks
n!
 

nfactorial

New Member
Oct 17, 2003
10
0
0
Thanks, I tried adding that and get 'Unknown property' so I added the following as well:

var string GroupName;
var string FriendlyName;
var string Description;

But I still get the compile error:

Assertion failed: FriendlyName!=NAME_None [File:.\UnClass.cpp] [Line: 679]

History: UStruct::Serialize <- (MyMainMenu TestMod.None) <- UState::Serialize <- UClass::Serialize <- (MyMainMenu TestMod.None) <- FArchiveSaveTagExports<<Obj <- FPropertyTag::SerializeTaggedProperty <- SaveStream <- UStruct::SerializeTaggedProperties <- (__OnCanClose__Delegate[0]) <- UClass::Serialize <- (Class TestMod.MyMainMenu) <- FArchiveSaveTagExports<<Obj <- TagExports <- UObject::SavePackage <- UMakeCommandlet::Main

:(

Thanks,
n!
 

Vito

New Member
Mar 18, 2002
143
0
0
Wow, neat, you're right. Wonder what's up with that.

Menu modification tutorials are the first thing we're going to be working on, but I can't really look into this until then. Sorry.
 

wilecoy

New Member
Oct 22, 2003
1
0
0
You can edit the RTInterface.int file in the system directory and change VideoTabLabel="Video" to VideoTabLabel="I've Changed this string for no-good reason".

I would like to know more about the classe "MainMenu", cause after some searches, i didn't see anything about this class.

Thanx.
 

nfactorial

New Member
Oct 17, 2003
10
0
0
Yeh, changing the text wasn't actually the point. I wanted to alter the menu system, changing the text was just a simple thing to get started rather than a goal that was aimed for :)

MainMenu can be found inside the file "RTInterface\Classes\MainMenu.uc" file.

n!
 

eblade

New Member
Jan 29, 2006
113
0
0
My apologies for bringing up a topic that is a couple years old now, but it appears that there are general problems with subclassing things that are descended from GUIPage ..

I am reworking the menu for a game built on the same release engine (2226), land of the dead (no, not a game done with runtime..), and am having similar problems:
Assertion failed: FriendlyName!=NAME_None [File:UnClass.cpp] [Line: 682] History: UStruct::Serialize <- (DAQueryPage UZGMenus.None) <- UState::Serialize <- UClass::Serialize <- (DAQueryPage UZGMenus.None) <- FArchiveSaveTagExports<<Obj <- FPropertyTag::SerializeTaggedProperty <- SaveStream <- UStruct::SerializeTaggedProperties <- (__OnKeyEvent__Delegate[0]) <- UClass::Serialize <- (Class UZGMenus.DAQueryPage) <- FArchiveSaveTagExports<<Obj <- UField::Serialize <- (Class UZGMenus.DAExitConfirm) <- UStruct::Serialize <- (Class UZGMenus.DAExitConfirm) <- UState::Serialize <- UClass::Serialize <- (Class UZGMenus.DAExitConfirm) <-FArchiveSaveTagExports<<Obj <- TagExports <- UObject::SavePackage <- UMakeCommandlet::Main


... when I add:

__OnKeyEvent__Delegate=DAGUIPage.HandleKeyEvent

to the defaultproperties.

Previously, I had attempted to simply subclass the game's mainmenu, and got the same error as the original poster of this message.

I'm curious as to if anyone's found a way to deal with these problems, as I'm not expecting any sort of a patch to fix it, but I would like to not have to create the -entire- thing from scratch...
 

Xander112

New Member
Mar 7, 2009
1
0
0
Hey, i have a problem with modifing the menu. I have been able to change the text in runtime but not the Background. I have looked in all of the classes under GUIPage but didnt find where background is set. In this tutorial: http://udn.epicgames.com/Two/GuiReference.html#Images it states that it should be in GUIPage.

Anybody know where i can find it?

Thanks in advance,
Xander