Hi,
In cooperative multiplayer it often involves that one has to find a sign in the sign list.
What I would like to do is to type the keyword I got via chat and the sign list will either just highlight the first match or better filter the view so only signs that contain the text I've typed.
This could also be applyed to town and station list which also tend to become long and tedious to scroll through. Through on sign-list one also have to check zero, one, two and possible even more spaces in the begining of the word.
Search in Sign List
Moderator: OpenTTD Developers
Search in Sign List
Last edited by Zuu on 29 Jul 2008 11:35, edited 1 time in total.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: Search in Sign List - and probably other lists too
So I checked out the source and had a look on the source. Note that currently the filtering is kind of hacky. A proper way would be to make a second list of signs with only the one that matches and then use it for output/input. What I've done is to in the print sign loop only draw signs that matches. Hacky - I know. And I'll attempt to make it better later when I have more time.
Solution:
1. Always allow typing when the window is open. Update sign list as you type and go to the first visible sign when user press Enter. Close window on escape.
2.
Your opinions on the two solutions or if you have a third option are welcome. Also if you have any other opinions on the search/filter function they are welcome.
--------
EDIT 2008-08-01: This thread have been continued in the development forum:
http://www.tt-forums.net/viewtopic.php?f=33&t=38715
Also I have to address some usability issues. Such as when typing should be activated and not. Solution:
1. Always allow typing when the window is open. Update sign list as you type and go to the first visible sign when user press Enter. Close window on escape.
2.
- Hide the edit box widget and have a button there.
- When the button is pressed (or via hotkey) the edit box appears.
- When the edit box is visible:
- Update the sign list as you type.
- Goto first shown sign on enter key
- Hide the edit box on escape and again show the button.
- When the edit box is invisible:
- User can close window with delete key as usual
Your opinions on the two solutions or if you have a third option are welcome. Also if you have any other opinions on the search/filter function they are welcome.
--------
EDIT 2008-08-01: This thread have been continued in the development forum:
http://www.tt-forums.net/viewtopic.php?f=33&t=38715
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Who is online
Users browsing this forum: No registered users and 12 guests