News:

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

Sort order switching button

Started by Ranran(retired), May 04, 2021, 06:42:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

In extended, we used the up and down arrows on the scroll bar to substitute asc and desc buttons for sorting.
However, this was not the original purpose of use, and had problems such as small size.
I created a sort button with a new theme that doesn't require a dedicated image.


The design is quite orthodox. (´ ・ ω ・ `)
More sophisticated design may be possible with image, but I wanted to avoid having all themes prepare them anew.
I think this is also useful in standard. What do you think?

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

prissi

I would suggest a new theme image with a fallback on the arrow ...

Looking at the dialogues, these are still a mess. Some use comboboxes for sort selectrion, some a button, some has reverse other not. A consistent design would be needed anyhow. So then one can introduce the sort button.

Ranran(retired)

#2
QuoteI would suggest a new theme image with a fallback on the arrow ...
Well, that's what I was concerned about... (´・ω・`)

So I changed the design like this.




Since it is not an image, themes do not need to prepare a new image for the sort order switching button.
Also, the size of the image is fixed, but this icon changes according to the size of the font (button).

For specifications that require an image, an alternative process is required if the theme does not have an image.
I think this design is good enough to understand and we don't need to prepare an image if don't need the effort to provide something better than that.
So I haven't implemented an image object (pak) to do this.

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

Roboron

Why don't keep the "Ascending" and "Descending" texts? IMO the more clear what a button does the better.

Now talking about hypothetical improvements, while a button is good enough, both the button and the combobox could be combined if we put the sort categories at the top of list and make them buttons that when clicked would sort the list by that category (toggling between ascending/descending when clicking again). Think on Excel tables for example. But this would require much more work, of course. Don't take it as a suggestion. I was only thinking aloud.

Ranran(retired)

QuoteWhy don't keep the "Ascending" and "Descending" texts? IMO the more clear what a button does the better.
I think it is case by case whether the letters are good or the symbols are good. But when it comes to sorting, I don't think many other games and applications use that method.
The symbol presented is common symbols found in a relatively large number of applications. Placing a help tooltip on the button is sufficient for understanding.

For example, imagine replacing all gadgets in the title bar with letters. The meaning is clear, but the title bar is crowded.
And layout issues. The symbol saves a lot of space.

It also eliminates differences between languages.
"Ascending" and "Descending" use so many characters and occupy a lot of width. However, in the case of Japanese and Chinese, both are expressed in just two letters. Therefore, there are meaningless dead space in those languages.
Simutrans's GUI auto-alignment feature sometimes auto-enlarges components and creates a large dead space in the GUI.
If the button has a fixed width, it will always look the same in any language and the designer can easily create the layout he want.

Excel-style tables are something I always keep in mind, but they take a lot of effort to implement. (´・ω・`)
In the olden days Bernd Gabriel seemed to try to implement such a thing in experimental, but it is in great conflict with simutrans's new GUI and can't be used.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Roboron


prissi

In in r9798, Thank you. Now I just have to change t\he dialogues ...