View Full Version : Extending MainMenu
nfactorial
17th Oct 2003, 09:50 AM
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!
Hellcat2k3
17th Oct 2003, 11:28 AM
Can you post your code, so we could take a brief look at it? :)
nfactorial
17th Oct 2003, 11:41 AM
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!
Hellcat2k3
17th Oct 2003, 11:46 AM
Try adding this:
defaultproperties
{
GroupName="MyGroup"
FriendlyName="Put A Fancy Name Here"
Description="Put A Sweet Descr Here"
}
nfactorial
17th Oct 2003, 01:41 PM
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!
Radiosity
17th Oct 2003, 02:33 PM
That's not a compile error, it's a general protection fault. Is this when you're actually trying to run the App after compiling the script?
nfactorial
18th Oct 2003, 08:34 AM
nope, its a ucc error at the end of compilation.
Thanks,
n!
Radiosity
18th Oct 2003, 09:07 AM
You get that after a compile? I'm impressed :)
Vito
18th Oct 2003, 09:38 AM
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.
nfactorial
20th Oct 2003, 03:44 AM
Oh ok, that's no problem. Just thought it was something I was doing wrong, thanks! :)
n!
Wormbo
20th Oct 2003, 05:05 AM
Oh ok, that's no problem. Just thought it was something I was doing wrong, thanks! :)
n!
And what did you do wrong? It might be a mistake others could have problems with as well.
nfactorial
20th Oct 2003, 05:19 AM
I didn't do anything wrong AFAIK, its an unknown issue that will be looked at in the future?
n!
wilecoy
22nd Oct 2003, 08:52 AM
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
22nd Oct 2003, 11:58 AM
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!
Daid303
22nd Oct 2003, 12:59 PM
I just stayed away from menus, and created my own menu using a Internaction :D works quite well. The only disatvantage is that you'll have to code everything from scratch, even the mouse movement.
Vito
22nd Oct 2003, 06:13 PM
Tutorial on basic new menus using the Runtime (http://udn.epicgames.com/pub/Technical/RuntimeExampleRestrictedMenu)
eblade
4th May 2006, 10:38 PM
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
7th Mar 2009, 07:04 AM
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
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.