News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

combobox inside the tab

Started by Ranran(retired), November 11, 2020, 10:48:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

I'm sorry but, I wonder if this is a bug that comes from standard code. (´・ω・`)

Extended has used a combo box instead of a toggle button.

It doesn't seem to work properly if the combobox is inside a tab.
Older GUI engines never opened it upwards. Yes, there is something wrong with the display when it opens upwards.


Behaves like this when in the gui_aligned_container.



If not gui_aligned_container


Combo boxes with errors have in common that they are in tabs. But unfortunately no similar arrangement is seen in standard.
If I suspect I'm making a mistake, I'd appreciate it if you could give me some hints on how to resolve it.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

prissi

Comboboxes are hackish, since they require careful tracking of the focus. But without the source code I suspect the second example text is drawn in ::draw after a gui_frame_t::draw() call and not a a gui_xxx element. This mixing of drawing does not work. You have to have you custom dran element inside a gui_componenet_t or gui_container_t and overide the draw method then.

I the first example it may help to enlarge the contaienr to the actual dialog bottom (either by setting the maximize flags or adding a fill component). It might be also an error.

Dwachs

There is some clipping involved. That list is clipped. I suspect at gui/components/gui_scrollpane.cc line 264. A possible fix(hackish) would be to temporarily reset the clipping in gui_combobox_t::draw.
Parsley, sage, rosemary, and maggikraut.

Ranran(retired)

Thank you for your advice and the correction work.
It seems that a recent fix only fixed the overlapping with tab labels.


This was previously pointed out by james, but mousehole operations seem to prioritize tab scrolling when it is in an aligned container.

When a tab has a scroll bar, the combo box inside the tab cannot be scrolled with the mouse. But if the tab doesn't have a scrollbar, you can scroll it with the mouse.


Works fine with older GUI.




However, if you open it upwards, the click and mouse wheel will be disabled above the red line.
The button is shown at the bottom, but the button has priority for the action. The same is true for tab labels.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)