Skip to content

Feat: Add StatsBars on bottom and refactor whole statsbars management#797

Merged
Nottinghster merged 8 commits intoopentibiabr:mainfrom
matheussf:feat_stats_bar_bottom_and_refactor
Jun 28, 2024
Merged

Feat: Add StatsBars on bottom and refactor whole statsbars management#797
Nottinghster merged 8 commits intoopentibiabr:mainfrom
matheussf:feat_stats_bar_bottom_and_refactor

Conversation

@matheussf
Copy link
Contributor

@matheussf matheussf commented Jun 28, 2024

Description

Just a brief on what's my idea here, since in my custom client I wanted to add stats bars on bottom (and maybe somewhere else in the future, who knows?) and it was a little complicated to understand the code and it would grown in a way that it will be hard to maintain in the future.

Refactored in a way that if someone forks this repo, it can customize in easier ways.

I've also fixed the height in otui for skills bar.

*I didn't mess with the skills options because I didn't feel like, things could break and would be a mess to fix. So if you want to customize bars with different widths/heights, there might be necessary some code change, but now its easier to do this.

Another disclaimer: the bottom stats bars in tibia global stays under the action bars, since I do not have experience with otui, I just made it above.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Open the client, go to settings options and choose a bar style.
  • Hover the mouse in the bar, open the menu with right click, change between styles.
  • Close the client and reopen again, it should have the configurations loaded the same as when the client was closed.

Test Configuration:

  • Server Version: Canary 13.32
  • Client: OTC Redemption
  • Operating System: Windows 11 23H2 (22631.3737)

Screenshots:

Options menu:

image
image

Bottom Stats bar:

image
image

Top Stats bar:

image
image

@kokekanon
Copy link
Contributor

kokekanon commented Jun 28, 2024

test in last commits : f8db2f8

image

panels:

modules.game_inventory.getIconsPanelOff()
modules.game_inventory.getIconsPanelOn()

image
modules.game_inventory.getIconsPanelOn():

image
modules.game_inventory.getIconsPanelOff():
image

Why did I add it there?

because I wanted to make only one onStatesChange.

if you want to delete it to make easier to maintain I suppose that, the most viable option is to put a new onStatesChange in game_inventary.

@matheussf
Copy link
Contributor Author

@kokekanon Thanks for the review! This was actually an unintended removal when I was refactoring. This shouldn't be removed, updated the code with this addition, thanks!

@Nottinghster
Copy link
Contributor

@kokekanon Thanks for the review! This was actually an unintended removal when I was refactoring. This shouldn't be removed, updated the code with this addition, thanks!

Ready to go or wip ?

@matheussf
Copy link
Contributor Author

matheussf commented Jun 28, 2024

@kokekanon Thanks for the review! This was actually an unintended removal when I was refactoring. This shouldn't be removed, updated the code with this addition, thanks!

Ready to go or wip ?

Ready to go. I would like that you guys test if its behaviour is still the same as you guys want for this repo

@Nottinghster Nottinghster merged commit 5fdb983 into opentibiabr:main Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants