joaofarias / csl-traffic

A WIP mod for Cities: Skylines to improve traffic.
91 stars 30 forks source link

Small UI inconsistencies #49

Open Archomeda opened 9 years ago

Archomeda commented 9 years ago

Hey!

I noticed that your UI panel is a bit inconsistent with the ones that the game provides as default. I haven't looked in detail at it yet, but I noticed the following:

And then a small incompatibility and a bit of self-advertising here. But since your UI hierarchy is a bit different from the game, a part of my mod does not pick up your panel correctly. The idea is that my mod patches the panels in a way that it allows scrolling with the mouse wheel. I do that in 3 phases, and it fails with one phase in your UI:

Apparently the parent of the UIScrollablePanel you use, is not a UIPanel. These panels are e.g. RoadsSmallPanel, RoadsMediumPanel, RoadsLargePanel, etc.

The only effect is that scrolling does not work when hovering below or above the left/right arrow buttons, while this does work with the default UI. It's not a big deal, since it works on the rest of the UI. I'm just wondering if you can take a look at it and see if you can replicate the default UI a bit more.

joaofarias commented 9 years ago

I won't be able to use one of the default panels because they don't support toggle buttons but I think I still use a UIPanel down the line. Let me get back to you tomorrow with more info.

Nice work on your mod, btw. :)

Archomeda commented 9 years ago

Thanks! I was really getting tired of clicking on those buttons over and over and over again. And then I'm not even using custom assets, yet. Some people have a lot of those. I can't imagine having to browse through them the vanilla way.

Hmm... if it's not possible, I can try to patch it into my mod. It depends which UI component you're using as a parent, if it's not a UIPanel. As long it's something that receives the OnMouseWheel event and it's not something that breaks the game, I'm more than happy to include it.

Also, I got a bug report on a small incompatibility with (according to his words) my mod and Terraformer. It seems that after clicking on the Terraformer tools (similar to your way), it automatically closes it again when moving the mouse towards it. But after investigating it, I noticed that it was not my mod that was causing it. Apparently that particular window closes when you hover your mouse over Traffic++'s tool icon and move your mouse away from it again. I noticed this too with the vanilla tool panels, although it does not always happen...

EDIT: Correction, with the vanilla tools, it's not the panel that closes, but the tools overlay.

joaofarias commented 9 years ago

Hey there! Sorry for taking so long.

I just checked and while I do have a UIPanel as a parent to the UIScrollablePanel, it's set as non interactive. Setting the isInteractive variable to true using modTools immediately solved the issue and I could scroll below the arrows.

I'll fix this for today's update. :)

Archomeda commented 9 years ago

Ahh. Yeah... it's not something I have checked :sweat_smile:. Good to know it's an easy fix though. I'll remember this, just in case I come across something like this again.

By the way, how about the rest though? :smiley:

joaofarias commented 9 years ago

The rest I'll have to check with more time. It's probably due to different resolutions. :)

Archomeda commented 9 years ago

Possibly. Although, if I'm not mistaken, it seems the game is based on 1080p and scales everything accordingly when a different resolution is used.

joaofarias commented 9 years ago

Hmm.. Then it should work fine. But I'm currently running the game on minimum settings and using 1366x768 (for bugfixing reasons) and there are some artifacts.

originalfoo commented 9 years ago

@Archomeda in your travels around UI land have you seen anything that can be used to prevent mouse-over/out of a toolbar button from deselecting the active tool? It's causing users much grief - see #37 (same also happens on Terraform Tool IIRC).

Archomeda commented 9 years ago

Oh, it's already reported. That's good. I noted the exact same issue a couple of comments back.

About solving it, no, I haven't found anything that might come even remotely close to it. I was touching a different part of the UI. It also doesn't help that there's literally no documentation whatsoever. I can try to take a look at it and see what the game does vs mods.