Jump to content

Changing position of UI elements with different resolutions


Go to solution Solved by TMP4,

Recommended Posts

Version of Files 40k

 

Hello, im trying to move the yangbox close to the minimap. I moved it to the place with my resolution of 2560x1440, but when i launch the game in 1920x1080 everything disappears. Is there a way to make that position for all resolutions?

 

yangText = self.NewGoldChat(None, wndMgr.GetScreenWidth()/2 - wndChat.CHAT_WINDOW_WIDTH/2 + 1450, wndMgr.GetScreenHeight() - wndChat.EDIT_LINE_HEIGHT - 37 + 9 - 950)

This is the code that is changing the position

 

2560x1440 - https://metin2.download/picture/RiX4OqECQZ5MFO25Gr7M0BVQQ2CEtjEf/.jpg - Its in the right place

1920x1080 - https://metin2.download/picture/QdWeYcjy4RhHv9A6ysMMZi6eBQ9aif3D/.jpg - Its gone

 

Thanks for any help! :)

Sorry for bad english, its not my main language ;) 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Contributor
  • Solution

Of course it will be wrong because you still use wndChat's paramteres while it's not related to wndChat anymore.

You want to stick with the upper right corner, so you don't need wndMgr.GetScreenHeight(), you only need wndMgr.GetScreenWidth().

(Using ScreenHight would make it stick to the bottom right corner btw)

 

Try this:

yangText = self.NewGoldChat(None, wndMgr.GetScreenWidth() - 50, 125)

This code make it stick -50 pixel in right, and -125 from top.

 

These numbers are not accurate with your wish, i don't have that type of yangChat to test where it will fit 100% with your exception,

so you'll have to test and edit those numbers. I just guessed rough numbers where it will be somewhat good.

Edited by TMP4
  • Love 1
Link to comment
Share on other sites

4 hours ago, TMP4 said:

Of course it will be wrong because you still use wndChat's paramteres while it's not related to wndChat anymore.

You want to stick with the upper right corner, so you don't need wndMgr.GetScreenHeight(), you only need wndMgr.GetScreenWidth().

(Using ScreenHight would make it stick to the bottom right corner btw)

 

Try this:


yangText = self.NewGoldChat(None, wndMgr.GetScreenWidth() - 50, 125)

This code make it stick -50 pixel in right, and -125 from top.

 

These numbers are not accurate with your wish, i don't have that type of yangChat to test where it will fit 100% with your exception,

so you'll have to test and edit those numbers. I just guessed rough numbers where it will be somewhat good.

 

 

That actually worked! Thank you ????? @TMP4

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



  • Similar Content

  • Activity

    1. 5

      Effect weapons

    2. 3

      Crystal Metinstone

    3. 3

      Feeding game source to LLM

    4. 113

      Ulthar SF V2 (TMP4 Base)

    5. 3

      Feeding game source to LLM

    6. 0

      Target Information System

    7. 3

      Feeding game source to LLM

    8. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.