News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Sort order switching button

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

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran

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.

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

#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

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

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.

Roboron


prissi

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