Jump to content
  • 0

[HowTo] Adding a new button in the client UI


astroNOT
Go to solution Solved by Ikarus_,

Question

  • VIP
Posted (edited)

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 post

2 answers to this question

Recommended Posts

  • 1
  • 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 post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



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