shpaass / yafc-ce

Powerful Factorio calculator/analyser that works with mods
GNU General Public License v3.0
40 stars 15 forks source link

Cannot drag scroll tab search scrollbar #168

Closed Dorus closed 3 weeks ago

Dorus commented 3 weeks ago

afbeelding

Cannot drag scroll tab search scrollbar.

veger commented 3 weeks ago

Hm... I thought I fixed all scrollbars in #161...

Scrollbars are (somehow) horrible in YAFC, they keep on breaking. Maybe it would be better to have a good thought and complete redesign their implementation? :thinking:

Currently having them stick at the correct position is hard, especially at the bottom, as the (ImGui) context is partial (often the Height is not filled in) and it is unclear which of the contexts is the correct one to use. Also the scrollbars draw to the current context/state, making it very hard to draw them at the edges of the screen/another context...

Unfortunately none of us are (real) SDL UI experts... So rewriting this part might be too much (#161 took me a lot of effort and is still not perfect)

Edit Currently I am on a quest to 'freeze' the fist column of the Summary view. And while it works, it is far from being able to make it in a PR, as lots of (UI) things got broken in the process.

Dorus commented 3 weeks ago

Well at least, this was broken before and after 161 ;)

veger commented 3 weeks ago

Oh... it was broken already, phew... :sweat_smile:

But still those scrollbars are a pain :disappointed:

veger commented 3 weeks ago

BTW I just tried, scroll wheel does work (as a work-around)