1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

Extending MainMenu

Discussion in 'Programming' started by nfactorial, Oct 17, 2003.

  1. nfactorial

    nfactorial New Member

    Joined:
    Oct 17, 2003
    Messages:
    10
    Likes Received:
    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!
     
  2. Hellcat2k3

    Hellcat2k3 New Member

    Joined:
    Oct 17, 2003
    Messages:
    3
    Likes Received:
    0
    Can you post your code, so we could take a brief look at it? :)
     
  3. nfactorial

    nfactorial New Member

    Joined:
    Oct 17, 2003
    Messages:
    10
    Likes Received:
    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!
     
  4. Hellcat2k3

    Hellcat2k3 New Member

    Joined:
    Oct 17, 2003
    Messages:
    3
    Likes Received:
    0
    Try adding this:
    Code:
    defaultproperties
    {
        GroupName="MyGroup"
        FriendlyName="Put A Fancy Name Here"
        Description="Put A Sweet Descr Here"
    }
    
     
  5. nfactorial

    nfactorial New Member

    Joined:
    Oct 17, 2003
    Messages:
    10
    Likes Received:
    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!
     
  6. Radiosity

    Radiosity Minty Fresh!

    Joined:
    Jan 3, 2003
    Messages:
    2,217
    Likes Received:
    0
    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?
     
  7. nfactorial

    nfactorial New Member

    Joined:
    Oct 17, 2003
    Messages:
    10
    Likes Received:
    0
    nope, its a ucc error at the end of compilation.

    Thanks,
    n!
     
  8. Radiosity

    Radiosity Minty Fresh!

    Joined:
    Jan 3, 2003
    Messages:
    2,217
    Likes Received:
    0
    You get that after a compile? I'm impressed :)
     
  9. Vito

    Vito New Member

    Joined:
    Mar 18, 2002
    Messages:
    143
    Likes Received:
    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.
     
  10. nfactorial

    nfactorial New Member

    Joined:
    Oct 17, 2003
    Messages:
    10
    Likes Received:
    0
    Oh ok, that's no problem. Just thought it was something I was doing wrong, thanks! :)

    n!
     
  11. Wormbo

    Wormbo Administrator Staff Member

    Joined:
    Jun 4, 2001
    Messages:
    5,913
    Likes Received:
    36
    And what did you do wrong? It might be a mistake others could have problems with as well.
     
  12. nfactorial

    nfactorial New Member

    Joined:
    Oct 17, 2003
    Messages:
    10
    Likes Received:
    0
    I didn't do anything wrong AFAIK, its an unknown issue that will be looked at in the future?

    n!
     
  13. wilecoy

    wilecoy New Member

    Joined:
    Oct 22, 2003
    Messages:
    1
    Likes Received:
    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.
     
  14. nfactorial

    nfactorial New Member

    Joined:
    Oct 17, 2003
    Messages:
    10
    Likes Received:
    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!
     
  15. Daid303

    Daid303 MSPA

    Joined:
    Aug 7, 2002
    Messages:
    246
    Likes Received:
    0
    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.
     
  16. Vito

    Vito New Member

    Joined:
    Mar 18, 2002
    Messages:
    143
    Likes Received:
    0
  17. eblade

    eblade New Member

    Joined:
    Jan 29, 2006
    Messages:
    113
    Likes Received:
    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...
     
  18. Xander112

    Xander112 New Member

    Joined:
    Mar 7, 2009
    Messages:
    1
    Likes Received:
    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
     

Share This Page