Jump to content

[HowTo] Adding a new button in the client UI


Go to solution Solved by Ikarus_,

Recommended Posts

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
https://metin2.dev/topic/26111-howto-adding-a-new-button-in-the-client-ui/
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

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.