Jump to content

Recommended Posts

Hi! Could you please tell how to change server creation screen? For example, “Host Game” title. I have some difficulties with this. 

1) Function AddClassPostCunstruct function doesn't give any result and for some reason it executes only after logging on to the server:

AddClassPostConstruct('screens/redux/servercreationscreen', function(self)
    self.title = "123 Test"
end)

2) Changing the values via GLOBAL.require didn't help either. I suspect this may be because the screen manages to initialize with the standard values faster than I change them.
 

photo_2024-12-01 19.22.58.jpeg

Link to comment
https://forums.kleientertainment.com/forums/topic/161651-changing-screen-title/
Share on other sites

Well, now I found serverslotscreen and manageserverslotscreen, they are all strongly related. Perhaps one of these screens overwrites the value of servercreationscreen.title. 

Logically, it would be possible to change STRINGS.UI.SERVERCREATIONSCREEN.HOST_GAME. But this is not the main goal. I would like to understand the logic in which sequence this screen is rendered and which class I need to edit eventually.

@Valericoe

Thanks to this https://forums .kleientertainment.com/forums/topic/151477-addclasspostconstruct-on-a-screen/?do=findComment&comment=1670362 I understood where to start.

Now I have issues with AddClassPostConstruct, but I suppose this is a theme for another topicI hope that this scheme will be useful for someone.

2024-12-04 14.56.45.jpg

I figured out how to change the header value. I think I should have paid more attention to the source code
 

local Templates = require "widgets/redux/templates"

AddClassPostConstruct("screens/redux/serverslotscreen", function(self)
    self.title = self.root:AddChild(Templates.ScreenTitle("123 Test"))
end)


 

translated.jpg

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...