View Full Version : Main Menu redesign
byteasc
11-08-2009, 02:32 AM
I'm trying to brush back up on my UnrealScript (since it has been awhile), so thought I'd fool around with the Main Menu.
I realize that Kismet is primarily responsible for part of the menu implementation (although in the UDK, it doesn't seem to properly play the specified matinee), and that UTEntryGame is what is being used for loading the UTFrontEnd level, but I'm not seeing where the tie-in from that to UTUIFrontEnd_MainMenu is.
Angel_Mapper
11-08-2009, 02:42 AM
The TitleScreen that's loaded in Kismet is created with the class UTUIFrontEnd_TitleScreen (when UIScenes are created it asks you what class to use). Line 164 of UTUIFrontEnd_TitleScreen loads the main menu:
OpenSceneByName(MainMenuScene, true);
[edit] If you're asking how to completely replace it, look at Map and LocalMap in DefaultEngine.ini in UTGame/Config. Change these to your own map and you can load your own menus through the map's Kismet (delete UTEngine.ini after you do that so the game can generate a new one).
byteasc
11-08-2009, 03:08 AM
Okay, I haven't looked at UIScene creation, just yet! I knew about the menu/map engine configuration though)
Btw, long time no see angel mapper, its been awhile! :)
Byte
byteasc
11-08-2009, 04:16 AM
Okay, I think that got me headed in the right direction! Definitely a change from when I use to do UT2k3/2k4 stuff lol...
Should we be subclassing UTUIScene or UTUIFrontEnd?
Angel_Mapper
11-08-2009, 04:27 AM
Depends, read through the classes to see what you would need that's already defined in each class.
Futaba
11-08-2009, 06:32 AM
Thx to those advice ive created my own frontend map, my own MainMenu(with one button). Things works fine, game starting-main menu appears. But now i have 2 questions:
1)how to disable default CloseScene if Esc is presed?
2)how to bind mybutton click to ChangeLevel(eg New Game once pressed brings player to the first level)? there are no such actions in kismet of menu... only Activate Level Event
Iam trying to understand standart UT3 MainMenu but...iam in stuck now)
Angel_Mapper
11-08-2009, 07:28 AM
1) Search the source code for HandleInputKey.
2) Search the source code for FindChild. The first argument is the name of the object in the UIScene.
I'd recommend hooking up an Exit button first heheh.
Futaba
11-08-2009, 07:48 AM
Ok, is there way to do it by kismet\uiedit?
byteasc
11-08-2009, 01:03 PM
Okay, great.. I looked thru the functionality, but since UTUIFrontEnd is "native", I wasn't sure if there was something specific that might've been needed for other stuff, but seems only movie related.
Although it seems the frontend doesn't completely fire properly in the UDK anyways, as it goes straight to the main menu and doesn't do the Press Any Key scene first, nor does it play the matinee behind the main menu.
favero_eduardo
11-16-2009, 01:20 AM
Futaba,
Yes, you can do this via kismet.
Check this tutorial made by Hourences:
http://tutorial.toltecstudios.com/
You will need two maps, one is the menu, another is the level, (I think you can do this with only 1, but is not recomended)
After, you will do the UI and call the next level via kismet.
Best Regards
Ayalaskin
11-28-2009, 08:53 PM
Favero, this tutorial doens explain how to avoid the Escape key being hitted and Canceling the main menu screen.
Angel_Mapper
11-29-2009, 02:08 AM
You'll need to make your own OnRawInputKey delegate function and check if EventParms.InputKeyName == 'Escape', and either return false to ignore it completely, or what I like to do, open a confirmation menu for exiting the game.
ffejnosliw
11-29-2009, 03:04 AM
You could do this in the Kismet of the UIScene itself. There should be a State Input Events node that you can double-click and select the keys you want to override. If you add the Esc key to this and do not connect the resulting output(s) to anything that "should" effectively cause the Esc key to do nothing. I can't confirm this without testing it and I am without UDK for the time being so take it for what it's worth.
Ayalaskin
11-29-2009, 12:54 PM
I tested overriden the input in the UIScene and it doenst work, but i found another way..
Go to UTGame/Config in the UDK folders.
Select DefaultInput.ini, right click and deselect the read only property.
Now open it and search for the Escape key and change
FROM:
-Bindings=(Name="Escape",Command="CloseEditorViewport | onrelease ShowMenu")
TO:
-Bindings=(Name="Escape",Command="CloseEditorViewport")
Now save it, close the UDK, open the Unreal FrontEnd, press Make > Full Recompile
The esc key should only close the editor.
If you dont want that the esc key closes the editor, delete this entire line.
Angel_Mapper
11-29-2009, 08:55 PM
If I were a player and the Escape key didn't act as I expected (moving up one menu or opening an exit confirmation on the main menu) I would be very frustrated.
Crozz
12-07-2009, 03:50 PM
You'll need to make your own OnRawInputKey delegate function and check if EventParms.InputKeyName == 'Escape', and either return false to ignore it completely, or what I like to do, open a confirmation menu for exiting the game.
Could you give any pointers as to how to open a custom menu upon pressing escape (in a game) instead of the original ut menu? I just have problems finding where I should start looking. I'm following Hourences' tutorial on a menu and I suspect there are some shortcuts taken there :)
eduardcoder
09-18-2010, 08:29 PM
Ayalaskin, disabling escape on DefaultInput.ini would disable it for every UIScene on the game... isn't there a way in Kismet to disable it for just the Main Menu UIScene?
Winwarproductions
01-14-2011, 03:28 PM
About deativating "Escape" Key.
Futaba and others who would like to know. Just deleting that line
-Bindings=(Name="Escape",Command="CloseEditorViewport | onrelease ShowMenu")
doesn't work at all. I tried it because I needed to deactivate escape for my main menu. I didn't want the main menu to go away when people press escape. Onlywhen theypress "Play Game"
So it's definitely in your defaultinput.ini file.
Scroll down to [Engine.UIInputConfiguration]
and find the line that says
+WidgetInputAliases=(WidgetClassName="Engine.UIScene"
Now if you continue down that line you will see
((InputAliasName="CloseScene",LinkedInputKeys=((InputKeyName="Escape")
Just delete the Escape and it should be all good.
Hope it helps. Helped me. I was lost for a minute. lol. Searching for 2 days through script. Peace out.
Powered by vBulletin® Version 4.1.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.