No announcement yet.

In-Game GUI

  • Filter
  • Time
  • Show
Clear All
new posts

    In-Game GUI

    I am looking for a turorial on creating in-game gui's like the one in the RPG mod. I cant find anything in the unreal wiki. Can anyone help me out.


    I dont think you'll find a tutorial on it. Might be wrong (I dont ever look for tuts anyway).

    That said, heres what you need to do to get a very very basic gui in your mod.

    First, you need a GUIPage, or a subclass of it. I dont care what you subclass, just pick something that looks "close" to what you want it to do, and use that. If your menu has to be tabbed, look at how the settings menus are created, if not then check out how the main menu is created. I think I normally subclass UT2K4GUIPage, for some reason (which I forget now, but its probably a good one).

    Next you want to add your "controls." Controls are buttons, text boxes, whatever you need. The best place to learn what there is to pick from is to look through existing menus and say "that's what I need, where is it?" and go and find that page (which is easier said than done sometimes, usually search for the tooltip text is the best way) and find that class, and use that in your page.

    To add controls to your page, make a variable (make sure it's automated) and then create the object in the default properties. Again, see the source code (you'll have to download the code drop from UDN to have these) for the GUI for examples.

    Once your menu compiles, you'll need to open it somehow. Check the PlayerController.uc code for ClientOpenMenu function to see how to do this.

    Once the menu appears in game, you can use the GUI designer to move the controls around your page (check UDN for specifics on this).

    Anytime you make a GUI in the game, you (usually) need to make your own GUIController. This is because you need to be able to add styles (assuming you create your own styles, if you dont then dont worry about a GUIController).

    There is some info on UDN if you dig a bit into the GUI sections, which will explain a bit of the terminology I used. Wiki can help as well, if you search.

    That should give you a gentle shove in the direction of "figure it out and ask questions that arent so broad." Not to be rude, but if you want to learn how to program, you will eventually need to learn how to use existing code as your tutorial. I assume you want to learn, otherwise you're just wasting everyones time.

    Good luck, though.


      Thanks, the information you suplied in your post was excactly what I was looking for. I am accually a programmer by trade and I consider myself to be a very good one at that so UnrealScript is second nature to me. I just needed to be pointed in the right direction and ill figure the rest out myself.



        Glad I could help, then.


          OK I have managed to create the in-game menu that I was looking for. I just have one problem.If I hit excape or click on my ok button which calls Controller.CloseMenu(); It exits the map to the main menu instead of going back to the game. What is wrong here.


            How are you closing the menu? Controller.CloseMenu(False); should be adequate.


              Its ok I got it working now. Tnx for the help again.