News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

gui_image_t has invalid alignment

Started by Ranran(retired), December 27, 2022, 09:39:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

I want to display an image in the center of the component with gui_image_t, but it doesn't work.
gui_image_t can pass arguments for control_alignment_t but this doesn't seem to work.

gui_image_t is always biased to the upper left corner of the component because the size of image is the size of the component and the minimum size maximum size is the same as that.
Second, since it is trying to handle vertical and horizontal alignment with a single switch(alignment) state, I don't think it can handle both vertical and horizontal at the same time.

I would appreciate it if you could confirm this issue.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Dwachs

Yes, that is correct. Most likely, the alignment parameter was not used anywhere in the gui code. The single switch has to be broken into one switch for horizontal and vertical alignement.

In order to achieve what you want, you could make a new class derived from gui_image_t that returns infinite max-size.
Parsley, sage, rosemary, and maggikraut.