Jump to content

CUSTOM UI - OnPostUIDraw (Event)- Adding in an easy "Join" server button


RAINBOW

Recommended Posts

I've had a look inside the "LastStandSetup.lua" found in the SteamApps/lua folders.

 

I noted that essentially, the Last Stand and subsequent Challenges, are in fact written as if by the way of a modder- that is to say, everything in there is handled from event handlers.

 

Neat.  

 

I've took it upon myself (after being unable to find anything on the forum under User Interfaces), to have a shot at achieving the following:

 

STEP 1:  Create a button that slots in alongside the initial game UI. Like so:

 

example_UI_zps4b17576a.png

 

STEP 2:  Once the button is clicked, execute the code to join the server's I.P Address.

 

And thats it! basically!  I haven't looked at any of the multiplayer code, but I've been diving into the UI stuff, would I be right in assuming it is not without the realm of possibility to use the following event:

 

OnPostUIDraw

 

To create some kind of button to achieve this?  Watch this thread for more progress as it happens-

Link to comment
Share on other sites

A fair warning: The ui code is quite complex and you should try to get a better understanding of how lua / coding works in general before diving into it (especially about how scopes work in lua, what functions actually are and especially about how TIS implements their OOP approach - which also needs you to understand more about metatables.)

Link to comment
Share on other sites

WOW.  You weren't kidding about the UI being pretty intense.  I think I'll just wait until you dev's create a "Join Server" option.  I don't envy you the task having took a look "under the hood" there-

 

Consider the thread closed-  I've just got so much more I could be getting on with, especially when considering you(The Devs) will probably add that stuff in once you're happy with the multiplayer beta testing.  

 

Seriously.  Wow.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...