NightmareXIV / Lifestream

Lifestream is a plugin that helps with navigation between data centers, worlds, instances, residential areas. Visit another world, data center or house with just a single command.
21 stars 15 forks source link

add separate width options for overlay #62

Closed Elypha closed 1 month ago

Elypha commented 1 month ago

Hello

thanks for the project! first time pr that a super simple enhancement which makes this option an inputint3 so that each col can have their separate width offset

2024-10-03_22-37-35_418

the current master branch doesn't compile but hopefully it works x

Limiana commented 1 month ago

Hello! Thank you for the PR. You can not change type in JSON file from an int to array of ints, this will result in loading issues. What needs to be done is creation of new configuration field with new name and a migration code added upon config loading. What's the issue with compiling? Did you try to update all submodules?

Elypha commented 1 month ago

thanks for the comment! it was a type error here https://github.com/Elypha/Lifestream/blob/pr-button-width/Lifestream/Utils.cs#L55 and seems I can fix it by adding a cast if(IsKeyPressed((int)Keys.LButton))

for the config migration may I know if you have any guidance like where to implement it for the sake of code consistancy? the plugin makes use of EzConfig which I'm not quite familiar with tho x

Limiana commented 1 month ago

Please check if your build configuration is configured like this, specifically with ECommons being set to "release with forms" image As for migration, just add a method to Utils and call it after configuration is loaded

Elypha commented 1 month ago

thanks for that! I was using the cli dotnet to build debug but in VS the release build worded fine so this seems to be the problem. should now be ready to merge and please give it a try!

edit: wait the ui need to be adaptive in case the col gets shrinked too much I'll take a look

Elypha commented 1 month ago

2024-10-04_03-42-19_336

Limiana commented 1 month ago

That looks nice for sure Did you finished with PR now?

Elypha commented 1 month ago

so long as people find it useful x yes it's ready for merge

Limiana commented 1 month ago

Thank you!

Elypha commented 1 month ago

@Limiana hello just noticed that with the current implementation, the instance switch got some problems since it uses the same variable for width with housing wards. if I'm not mistaken the overlay window seems to use ResizeButton method which in fact sets the base width to the widest button in the whole window which may subject to change and other offsets based on this may therefore visually broken due to the longest button may be longer or shorter maybe it requires some kind of larger rework to update the current drawing logic to something like a) collecting all members in a col b) get the longest and set width once before draw c) draw each member with that width and after that maybe the offset function can be a standalong option in the config i.e. not under fixed overlay position?

Limiana commented 1 month ago

I'll see what I can do about improving the UI