News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

[patch]Adding name filter to depot

Started by THLeaderH, March 28, 2017, 12:57:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

(This is a remaking version of this. I got a permission of reproduction from the original author.)
This patch adds a name filter to a depot.

  • The left button switches whether the filter is applied or not.
  • Pak names or translated texts can be used for search. It's case sensitive.
This patch is r8121 based, but I confirmed that this patch can be applied to r8154 without any problems.

Leartin

Would it be possible to add a way to safe some search words in a dropdown list? Ideally, pakset-sensitive and with the possibility for paksets to come with some pre-defined filters :)

prissi

#2
Extending the standard size is not very nice, as it break the tileability. Also which the checkbox? If empty, then there should be no filtering ...

Also the adding of listeners must be done on initialisation, not when updating the size.

EDIT: There were also lot of obsolete code in the depot frame after combobox renovation. All repaired and incorporated in r8160.

Yona-TYT


prissi

This works fine for me. Maybe some of your defines still had a wrong height?

Yona-TYT

Quote from: prissi on April 03, 2017, 11:55:38 PM
This works fine for me. Maybe some of your defines still had a wrong height?
Select the drop-down filter and then you must resize the deposit window, that should be enough.

Yona-TYT

Sorry for reliving an old theme.

I had never used the word search in the warehouse, and now that I try it, I have found a little inconvenience.

The problem is the distinction between upper and lower case letters, I think that in searches for text in much more useful terms, there are no differences between upper and lower case letters, in my humble opinion.

prissi

There is unfortunately no standard UTF-8 compatible pattern matching. So while A and a are the same ä and Ä would not.