News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

gui_routebar_t

Started by Ranran(retired), September 20, 2020, 01:17:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

I brought a patch that I'm trying to introduce to extended.
Now that the code in my extended branch is relatively close to standard, I think it's easy to merge to standard.

In this patch, the routebar is independent from the gui_speedbar_t and has its own original design.
The convoy info dialog has three speedbars of the same design. With this independence, the route bar claims to be the route (progress) bar and gains the player's understanding.

Demo image (in extended):

Please note that the image quality is significantly degraded due to the characteristics of the gif. (The only thing that makes the triangle appear to disappear is that the stupid gif erased it.)


There is still some room for improvement. But sensei always urges me not to try to finish it completely from the beginning.
For example, you can specify those colors by theme, subdivide the scale, finely adjust the size, triangular shape, etc.
The scale is fixed in 4 divisions, but this is not bothersome if the width is about 100px. On the other hand, some people may find it unsatisfactory to extend it.
There was also an idea to change the color that was passed through depending on the waytype.
Also, the shape updates only when the bar moves, which is not ideal behavior. Unfortunately I couldn't fix it. It may not be a big problem, but I hope it can be fixed.
Ideally, I wanted to change the color depending on status such as stuck, but independence is the first step anyway.
So it's up to you to make fine adjustments and incorporate it. Thank you (´・ω・`)


EDIT:
There was an error in the code, so I fixed the attachment file.

EDIT2:
The extended's convoi_info is still using the old engine and has not been tested with the new GUI engine.
I'm currently testing the extended's convoi_info with a new GUI engine, but it seems to have display issues...


EDIT3:
There was no problem with the code itself.
route_bar.set_height(9);
You need to set a reasonable height as described above. It looks better if you set it a little larger than the speedbar to display squares and triangles.

EDIT4:
I changed to a method that updates the shape and color. But unfortunately this part makes a difference between standard and extended.
Stuck displays an orange square() and no route displays a red square ().
I have set a condition that seems to be available in standard as well. set_state is currently assigned a value directly in uint8, but I think it will be easier to read if you customize it by making it an enumeration type. Since there are many types of states in extended, I think there will be a difference in this part. So from this point onward, extended will separate it into different code.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

prissi

Incorporated in r9256, Thank you.