CitiesSkylinesMods / TMPE

Cities: Skylines Traffic Manager: President Edition
https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252
MIT License
574 stars 85 forks source link

bidirectional lane connection UI #1492

Closed kianzarrin closed 2 years ago

kianzarrin commented 2 years ago

fixes #1214 fixes #762

kianzarrin commented 2 years ago

this is how it looks like. I can tweak the size

kianzarrin commented 2 years ago

image this is also possible. Also I can make it triangle. I can also easily play with angles.

originalfoo commented 2 years ago

Could the arrowhead be solid triangle in same colour as the connector line?

kianzarrin commented 2 years ago

@aubergine10 , I can make them triangle but not solid triangle. Also if it is the same color as the line then it will be harder to detect.

krzychu124 commented 2 years ago

@aubergine10 , I can make them triangle but not solid triangle. Also if it is the same color as the line then it will be harder to detect.

Hmm, why not use solid triangle texture and render it rotated as quad? Check out NetTool.RenderRoadAccessArrow

kianzarrin commented 2 years ago

@krzychu124 As I said my code does has alternate to use quads. its just that its empty inside. I suspect CS quads are smaller and therefore the borders fill in the whole lane. Since our lanes has sheath, using quad for us might get a big complicated. I give it another try

kianzarrin commented 2 years ago

meanwhile that I am playing with shapes. it would be nice to review the rest of the code. it does not have to wait.

krzychu124 commented 2 years ago

meanwhile that I am playing with shapes. it would be nice to review the rest of the code. it does not have to wait.

The thing is you don't need to build the shape... Use texture decal and just rotate it to face correct direction similar to what you already done with arrows.

originalfoo commented 2 years ago

Does the triangle need to be so large (256x256) ?

kianzarrin commented 2 years ago

image

kianzarrin commented 2 years ago

complicated UI improvements will be tracked in: https://github.com/CitiesSkylinesMods/TMPE/issues/1500 I don't want to make this PR too big.