Jump to content

[HowTo] Adding a new button in the client UI


Go to solution Solved by Ikarus_,

Recommended Posts

  • Premium

Hello,

 

How can i create a new button that will show somewhere on the player's screen, which files stand for button object creation, and which module is the actual UI design ? To respect the patterns already implemented?

 

I assume I would create a button based on the classes in ui.py module. The question is where do I create the actual UI definition to display the button

 

in game? And on click, the lets say icon.tga button would display a message, "Hello world"?

 

Thanks

Edited by astroNOT
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Developer
  • Solution
On 3/13/2021 at 11:28 AM, astroNOT said:

Hello,

 

How can i create a new button that will show somewhere on the player's screen, which files stand for button object creation, and which module is the actual UI design ? To respect the patterns already implemented?

 

I assume I would create a button based on the classes in ui.py module. The question is where do I create the actual UI definition to display the button

 

in game? And on click, the lets say icon.tga button would display a message, "Hello world"?

 

Thanks

It depend where you need to add it... 

e.g.
add button in inventory -> uiinventory.py
add button in taskbar -> uitaskbar.py

add button in minimap -> uiminimap.py

etc etc

My youtube channel  on which you can see my works here

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.