Digital Paint Discussion Board
Development => Bugs, Feature Requests, and Feedback => Official Feature Votes => Topic started by: FlaMe on January 06, 2008, 05:47:22 PM
-
Customizable skins.? I swear i open serverbrowser more times than i open up DP.
Search function - search for partial names somehow connected to the GLS so you can search your clan tag or player names to see if someones on
Remove the annoying beep when you refresh?
Changeable fonts?
And the one in-game is quite bad tbh
...you cant see the port numbers on the diff servers.
maybe a smaller font/bigger window
-
Are you talking something like the All-Seeing Eye?
I don't get a beep.
Menu widgets will help fix seeing the server port and what not.
-
well I hate when someone says GT match 3, and i cant see which one that is without opening up serverbrowser.exe
maybe the server admins could just shorten the names of their servers orrrr
we get a smaller in-game font with the ability to ignore servers or cancel their pings so i dont have to see the n00by jump servers on my list.
-
What you don't like the high piniging leezerz.com jump server?
-
i meant more like the aussie servers
i have login to the Leezerz servers... so i dont mind them...
i mean the home run n00b servers run off a german lan 56k
-
Could this also include the in-game server browser. The search feature would be nice along with Zorch's menus.
-
You're going to need to make more specific feature requests so people can vote for/against the ones they like/don't like. I'm not keen on skins, for example. They just add bloat. If you want it to look different, change your windows theme.
-
i just want a search player function as well as an ignore function.
-
A player search button and Zorch's password fill in window seems to be the only wanted feature.
-
An ignore function does not seem worth the effort at all, just don't join it.
-
ok fine... ignore my original post and rename this thread "Feature: Player Search Function in Serverbrowser"
-
and in game because some people don't use the server browser.
-
http://dplogin.com/dplogin/featurevote/feature.php?id=10060
-
I just updated my old serverbrowser code to search for players as well. Of course, it doesn't have a GUI, and needs a tiny bit more tweaking, but hey. I'll put it out tomorrow.
-
How different is implement it to new version of server browser.. i think SB works now pretty good and some search function could be helpful.
-
This is my try for a player search function. I will append my serverbrowser.exe, to see the dialog press CTRL + F. It's at least working on my machine.
The file size has increased drastically, probably because my compiler likes to link statically while microsofts does it dynamically for common libraries. I did not link any more libraries nor include any other files, i just used all the things that were used in the program before so when compiling with the MS compiler the file should again be as small as it used to be.
Screenshot:
(http://imageshack.com/a/img39/2157/su9.PNG)
Edit: Added a patch for the csv repository 2 posts below.
About the code: I marked everything I edited with "//Edit by Richard" and I will also write down all changes here so it should be easy to apply my changes to other files. One problem is that I use another IDE and another compiler and therefore also needed to do some adaptions to other parts of the code (mostly replace snprintf_s with snprintf), so if anyone wanted to use this he or she probably has to copy the parts I changed manually. The other problem is that I don't know how other people like to organize their source code, so I can't tell for sure where to put declarations and implementations. But I will append my project folder as a zip file so everyone who wants can download the complete source. (Used IDE: CodeBlocks; Compiler: TDM-GCC-64 V4.8 ). Also, I will write down all my changes in this post hoping it will be easy to apply / copy this.
The basic function is (I put this in serverbrowser.cpp, to the end of the file):
//Edit by Richard
//__IN_ sName is the name to search for
//_OUT_ vFound is a vector of a pair containing 1. the key value of the server in g_mServers
// where the player is playing
// and 2. his index in the vPlayers vector
void SearchPlayer(std::string sName, std::vector < std::pair<std::string, int> > * vFound)
{
vFound->clear(); //clear the vector we'll write in
for(int i = 0; sName[i]; i++){
sName[i] = tolower(sName[i]);
}
//make the name we search for lowercase so the search is case insensitive
std::string sPlayerNameCopy;
for (g_mServers_iterator_t iServer = g_mServers.begin(); iServer != g_mServers.end(); iServer++) //loop through all servers
{
for (int iPlayer = 0; iPlayer < iServer->second.vPlayers.size(); iPlayer++) //loop through all players
{
sPlayerNameCopy.assign(iServer->second.vPlayers[iPlayer].sName);
for(int i = 0; sPlayerNameCopy[i]; i++){
sPlayerNameCopy[i] = tolower(sPlayerNameCopy[i]);
}
//also transform the players name to lowercase
if ((sName.length() == 0) or (sPlayerNameCopy.find(sName) != std::string::npos))
//if playername contains the name we're searching for or sName is empty
{
vFound->push_back(std::pair<std::string, int>(iServer->first, iPlayer));
}
}
}
}
this function needs one typedef, I put it in the header of serverbrowser.cpp:
//Edit by Richard
typedef std::map<std::string, serverinfo_t>::iterator g_mServers_iterator_t;
I also declared this function in serverbrowser.h so I can use it in the GUI.cpp:
//Edit by Richard
void SearchPlayer(std::string, std::vector < std::pair<std::string, int> > *);
To implement the GUI I used a simple dialog resource. Therefore, some things need to be defined in resource.h:
//Edit by Richard
#define IDM_SEARCHPLAYER 32778
#ifndef IDC_STATIC
#define IDC_STATIC (-1)
#endif
#define IDD_SEARCHPLAYER 32779
#define IDC_SP_EDIT 32780
#define IDC_SP_LIST 32781
The numbers should be exchangeable as long as they are not used somewhere else in the program.
The dialog itself (I only created it in english until now, so I made it language neutral):
//Edit by Richard
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_SEARCHPLAYER DIALOG 0, 0, 180, 249
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
CAPTION "Player Search"
FONT 8, "Ms Shell Dlg"
{
DEFPUSHBUTTON "OK", IDOK, 123, 228, 50, 14
LTEXT "Please enter the player's name:", IDC_STATIC, 7, 7, 132, 8, SS_LEFT
EDITTEXT IDC_SP_EDIT, 7, 20, 166, 14, ES_AUTOHSCROLL
LISTBOX IDC_SP_LIST, 7, 62, 166, 161, WS_TABSTOP | WS_VSCROLL | LBS_NOINTEGRALHEIGHT | LBS_SORT | LBS_NOTIFY
LTEXT "Results: ", IDC_STATIC, 7, 49, 132, 8, SS_LEFT
}
And, of course, the keyboard shortcut needs to be added to the accelerators, I also did this at the top of the file in a languagye unspecific location just for testing:
//Edit by Richard
IDC_SERVERBROWSER ACCELERATORS
BEGIN
"F", IDM_SEARCHPLAYER, VIRTKEY, CONTROL, NOINVERT
END
And, finally, changes to the serverbrowserGUI.cpp:
First, i forward declared a callback function:
EDIT: The mFound_iterator_t typedef is not needed. I used to give back results drom SearchPlayer() in a map but then changed it to a vector where an iterator is not needed anymore!
//Edit by Richard
//typedef std::map<std::string, int>::iterator mFound_iterator_t; //not necessary!
static LRESULT CALLBACK SearchPlayerDlg (HWND, UINT, WPARAM, LPARAM);
Then, the message by the accelerator needs to be handeled, so this is put into the "OnCommand" function into the switch:
//Edit by Richard
case IDM_SEARCHPLAYER:
DialogBox(g_hInst, (LPCTSTR)IDD_SEARCHPLAYER, hWnd, (DLGPROC)SearchPlayerDlg);
return TRUE;
And this is the callback function for the dialog:
//Edit by Richard
//Message handler for Player Search Dialog
static LRESULT CALLBACK SearchPlayerDlg (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
SendMessage(hDlg, WM_COMMAND, MAKEWPARAM(IDC_SP_EDIT, EN_CHANGE), (LPARAM) GetDlgItem(hDlg, IDC_SP_EDIT));
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
if ((LOWORD(wParam) == IDC_SP_EDIT) and (HIWORD(wParam) == EN_CHANGE))
{
std::string sContentBuffer;
char szNameBuffer[GetWindowTextLength(GetDlgItem(hDlg, IDC_SP_EDIT)) + 1];
std::vector <std::pair<std::string, int> > vFound;
SendMessage(GetDlgItem(hDlg, IDC_SP_LIST), LB_RESETCONTENT, 0, 0);
GetWindowText(GetDlgItem(hDlg, IDC_SP_EDIT), szNameBuffer,
sizeof(szNameBuffer) / sizeof (szNameBuffer[0]));
SearchPlayer(szNameBuffer, &vFound);
for (int i = 0; i < vFound.size(); i++)
{
sContentBuffer.assign(g_mServers[vFound[i].first].vPlayers[vFound[i].second].sName);
sContentBuffer.append (" on ");
sContentBuffer.append (g_mServers[vFound[i].first].sHostName);
int index = SendMessage(GetDlgItem(hDlg, IDC_SP_LIST), LB_ADDSTRING,
0, (LPARAM) sContentBuffer.c_str());
//maybe needed to determine the selected list box item later:
//SendMessage(GetDlgItem(hDlg, IDC_SP_LIST), LB_SETITEMDATA, index, i);
}
return TRUE;
}
break;
}
return FALSE;
}
Hoping that this helps,
Richard
-
Not bad richard, but I'm hater here so let me hate a bit:
1.Your comments are bit awful, example: vFound->clear(); //clear the vector we'll write in//ORLY?
If you want to comment your code, don't repeat what instruction does, it's beginner mistake.
2.In current state, it's not really useful: I would like if it had asterix and question mark support to make searching easier. Also if you click on listbox, you should be moved on server list to that server and player.
Still, I approve of your job, but this serverbrowser is missing functionality like friend status me and rocklitude have with ours serverbrowsers.
Also, if you modified source, and this project is on SVN, you should generate patch rather than send whole source.
-
2.In current state, it's not really useful: I would like if it had asterix and question mark support to make searching easier. Also if you click on listbox, you should be moved on server list to that server and player.
For things like asterisk support: nice idea, I also thought about it, but to accomplish it you would require a regex function, which is only included in C++11 or other libraries (e.g. boost) and i don't know wheter jitspoe would like to use these...
About the OnClick events: Yes, that's a good idea and should also be doable, but first I wanted to check what other people think about this. If the only response I get is: "We already got serverbrowsers which are much better that the default one" then I'm not going to spend time on improving the default one..
-
For things like asterisk support: nice idea, I also thought about it, but to accomplish it you would require a regex function, which is only included in C++11 or other libraries (e.g. boost)
Or you can just write your version, if there isn't mass of such code on internet. It's simple... Yet it will be harder to extend.
but first I wanted to check what other people think about this. If the only response I get is: "We already got serverbrowsers which are much better that the default one" then I'm not going to spend time on improving the default one..
Well, I haven't got any request for my serverbrowser, so I guess people are mostly used and happy with default serverbrowser in it current state or use built-in serverbrowser. At least thats what I suppose.
-
Also, if you modified source, and this project is on SVN, you should generate patch rather than send whole source.
I can not find a SVN repository... Do you mean CSV? http://paintball2.cvs.sourceforge.net/viewvc/paintball2/serverbrowser/
Well, here's the patch, created with TortoiseCSV. It also contains some changes where i didn't change anything because my IDE trims spaces at the end of a line.
Or you can just write your version, if there isn't mass of such code on internet. It's simple... Yet it will be harder to extend.
Well, I haven't got any request for my serverbrowser, so I guess people are mostly used and happy with default serverbrowser in it current state or use built-in serverbrowser. At least thats what I suppose.
My question is: do you really need something like an asterisk that matches every string? I mean, when i open up the dialog right now and want to check if a player with the name "payl" is playing,
just entering "p" gives 9 results
just entering "pa" gives 1 result
and entering "pay" gives 0 results
So who would use such a feature?
-
Thanks for the contribution, xrichardx! I'll try to take a look at it when I get home.
-
I've just extended the dialog callback function. It now also selects the server the player is playing on when you click on a result:
//Edit by Richard
//Message handler for Player Search Dialog
static LRESULT CALLBACK SearchPlayerDlg (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
SendMessage(hDlg, WM_COMMAND, MAKEWPARAM(IDC_SP_EDIT, EN_CHANGE), (LPARAM) GetDlgItem(hDlg, IDC_SP_EDIT));
return TRUE;
case WM_COMMAND:
static std::vector <std::pair<std::string, int> > vFound;
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
if ((LOWORD(wParam) == IDC_SP_EDIT) and (HIWORD(wParam) == EN_CHANGE))
{
std::string sContentBuffer;
char szNameBuffer[GetWindowTextLength(GetDlgItem(hDlg, IDC_SP_EDIT)) + 1];
SendMessage(GetDlgItem(hDlg, IDC_SP_LIST), LB_RESETCONTENT, 0, 0);
GetWindowText(GetDlgItem(hDlg, IDC_SP_EDIT), szNameBuffer,
sizeof(szNameBuffer) / sizeof (szNameBuffer[0]));
SearchPlayer(szNameBuffer, &vFound);
for (int i = 0; i < vFound.size(); i++)
{
sContentBuffer.assign(g_mServers[vFound[i].first].vPlayers[vFound[i].second].sName);
sContentBuffer.append (" on ");
sContentBuffer.append (g_mServers[vFound[i].first].sHostName);
int index = SendMessage(GetDlgItem(hDlg, IDC_SP_LIST), LB_ADDSTRING,
0, (LPARAM) sContentBuffer.c_str());
SendMessage(GetDlgItem(hDlg, IDC_SP_LIST), LB_SETITEMDATA, index, i);
}
}
if (HIWORD(wParam) == LBN_SELCHANGE and LOWORD(wParam) == IDC_SP_LIST)
{
int iFoundIndex;
int iListId;
iFoundIndex = SendMessage(GetDlgItem(hDlg, IDC_SP_LIST),
LB_GETITEMDATA,
SendMessage (GetDlgItem(hDlg, IDC_SP_LIST), LB_GETCURSEL, 0, 0),
0);
iListId = GetListIDFromAddress(vFound[iFoundIndex].first.c_str());
if (iListId >= 0)
{
SetFocus(g_hServerList);
ListView_SetItemState(g_hServerList, -1, 0, 0x000F);
ListView_SetItemState(g_hServerList, iListId, LVIS_FOCUSED | LVIS_SELECTED, 0x000F);
UpdateInfoLists(iListId, false);
//TODO: set scrollbar position
}
return TRUE;
}
break;
}
return FALSE;
}
I'll add source, the executable and a cvs patch containing all changes.
-
I can not find a SVN repository... Do you mean CSV? http://paintball2.cvs.sourceforge.net/viewvc/paintball2/serverbrowser/
Well, here's the patch, created with TortoiseCSV. It also contains some changes where i didn't change anything because my IDE trims spaces at the end of a line.
Let it be CSV, github or anything else. It doesn't really matter.
My question is: do you really need something like an asterisk that matches every string? I mean, when i open up the dialog right now and want to check if a player with the name "payl" is playing,
just entering "p" gives 9 results
just entering "pa" gives 1 result
and entering "pay" gives 0 results
So who would use such a feature?
I use it, because I sometimes don't want to update my friend list every time some noob changes clan so I do "*nick" and it will only match end that has "nick", it can help if people have short name that can be in another nick. Another reason I used it was that my player search can only find one people at time, so having false positives was not nice.
It just helps if you are not sure about nick, i.e. you know you had noname with number ending with 0: noname???0 .
So I do "need" it in way I use it (no multiple results and friend list based on that). But for now here it isn't that important, it depends which way you go with it.
-
Hm, for some reason the patch did not want to apply:
$ patch -i serverbrowser.patch
(Stripping trailing CRs from patch; use --binary to disable.)
patching file resource.h
Hunk #1 FAILED at 31 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file resource.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file serverbrowser.cpp
Hunk #1 FAILED at 8 (different line endings).
Hunk #2 FAILED at 591 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file serverbrowser.cpp.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file serverbrowser.h
Hunk #1 FAILED at 8 (different line endings).
Hunk #2 FAILED at 42 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file serverbrowser.h.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file serverbrowser.rc
Hunk #1 FAILED at 14 (different line endings).
1 out of 1 hunk FAILED -- saving rejects to file serverbrowser.rc.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file serverbrowserGUI.cpp
Hunk #1 FAILED at 8 (different line endings).
Hunk #2 FAILED at 17 (different line endings).
Hunk #3 FAILED at 58 (different line endings).
Hunk #4 FAILED at 134 (different line endings).
Hunk #5 FAILED at 161 (different line endings).
Hunk #6 FAILED at 193 (different line endings).
Hunk #7 FAILED at 233 (different line endings).
Hunk #8 FAILED at 458 (different line endings).
Hunk #9 FAILED at 631 (different line endings).
Hunk #10 FAILED at 688 (different line endings).
Hunk #11 FAILED at 959 (different line endings).
Hunk #12 FAILED at 1070 (different line endings).
Hunk #13 FAILED at 1081 (different line endings).
Hunk #14 FAILED at 1179 (different line endings).
14 out of 14 hunks FAILED -- saving rejects to file serverbrowserGUI.cpp.rej
I guess you changed the line endings in the files?
Edit: nevermind, had to use --binary as a parameter.
Edit 2: um... this doesn't compile.
if ((LOWORD(wParam) == IDC_SP_EDIT) and (HIWORD(wParam) == EN_CHANGE)) <=- what is "and"?
char szNameBuffer[GetWindowTextLength(GetDlgItem(hDlg, IDC_SP_EDIT)) + 1]; <=- not constant
Edit 3: Made some minor changes and got it compiling... your compiler is strange...
Edit 4: Submitted changes to repository and put new build in folder to be included with the next build package (it's only ~4k larger, so the size difference you saw must have just been compiler related).
-
Edit 2: um... this doesn't compile.
if ((LOWORD(wParam) == IDC_SP_EDIT) and (HIWORD(wParam) == EN_CHANGE)) <=- what is "and"?
char szNameBuffer[GetWindowTextLength(GetDlgItem(hDlg, IDC_SP_EDIT)) + 1]; <=- not constant
Edit 3: Made some minor changes and got it compiling... your compiler is strange...
Edit 4: Submitted changes to repository and put new build in folder to be included with the next build package (it's only ~4k larger, so the size difference you saw must have just been compiler related).
"and" should be the written alternative to "&&". AFAIK it should also be part of the standard:
http://en.cppreference.com/w/cpp/keyword/and
If it doesn't work with the MS compiler then I'm sorry for the inconvenience.
Initializing arrays to a variable size is indeed a speacial "feature" of the GNU Compiler Collection c++ compiler - I did not know that. Also here, I'm sorry for the inconvenience. I did this because I don't like having the risk of buffer overflows like you do have when you just initialize it to 256. Probably a vector of chars should then be used there:
std::vector vNameBuffer(GetWindowTextLength(GetDlgItem(hDlg, IDC_SP_EDIT))[/color] + 1);
and "&vNameBuffer[0]" should be used to pass it to any function that wants a char pointer to write at.
-
Doublepost:
Inspired by T3RR0R15T i've done a few more improvements:
1. When the dialog is opened, the initial focus is now already on the edit control
2. An Update button was added which will reload all players on all servers and re-do the search.
3. When no player was found, this information will be displayed in the listbox instead of nothing.
Also, i've put the dialog and all other resources in the correct, language neutral area in the resource file. Adding it directly at the header was only a temporary solution.
T3RR0R15T is right now collecting translations of the dialog so hopefully we have correct translations for all languages soon. AFAIK he still needs translations for the French and Slovakian language.
/Edit: The update button is not working the way it should right now as a function call of "UpdateList" does not block the program until the local variables are really updated. So, the search is re-done on the local saved players before the pb2 servers actually have answered and the players in the local variabled have been updated. So right now, the Update button has to be pressed twice in order to really update the content. Any ideas about how to solve this?
My ideas:
1. wait for the WaitThread to receive all answer - possible problem: Sometimes there are IPs without a running server on the serverlist and they would not send an answer.
2. have a fixed time to wait after calling "UpdateList" but before the search is done - possible problem: not as fast as it could be, users would have to wait for their list to be updated and it might feel unresponsive.
3. combination of 1 and 2: problem: the program would often wait for the whole timeout if there are any offline ips on the local serverlist. This may feel unresponsive, so same problems as 2.
4. 2 different buttons: One for refreshing the serverlist and one for redoing the local search. Problem: This might confuse users.
5. No buttons at all and just an auto-update-interval. Problem: Servers may be spammed.
-
I've added the patch above and some menu changes to the cvs.
-
In order to make the update button work better a made a few improvements. If not starts reloading the players on all servers, waits one seconds in an extra thread while replacing the update button's text with dots so the user knows that something is going on and then does the search. Also, it tries to keep the same player selected if possible (means: if he did not disconnect).
It's posssible that there are some problems regarding the casting of the argument-structure (args). The GNU compiler does fine, but I don't know about MS's compiler. If it throws any errors then I don't want to occupy anyone's (jitspoe's or T3RR0R15T's) time, simply tell me and I will download and install Microsofts compiler in order to fix this myself. Edit: T3RR0R15T confirmed that VC++ 2012 does compile this.
-
Interesting that this is the first time I've heard of the and/or keyword operators. Seems they're almost never used but were there to support old keyboards without &, |, ^, etc. symbols. Took me a while just to find a page that explained that: http://stackoverflow.com/questions/2376448/the-written-versions-of-the-logical-operators
Do you have a sourceforge.net account? It would probably be easiest to just give you direct CVS access so you can submit your changes directly without making patches.
-
I just sent you a PM with my account detail.
Edit: Which compiler are you using right now? Visual Studio 2008?
-
Interesting that this is the first time I've heard of the and/or keyword operators.
Well jitspoe, you surely never heard of any other language than C/C++...
Almost all modern languages support and/or/not, even those whose were firstly implementing C-style (i.e. PHP). Seems like C++ went same way.
The GNU compiler does fine, but I don't know about MS's compiler.
That's why C++ suck, there is no standard whatsoever, and both MS and GCC tries to be cool by adding some weird stuff that will break more older code, by i.e. removing old stuff... take this as an example: http://stackoverflow.com/questions/3437410/c-extension-and-operators , did you know of that operator jitspoe?
-
Edit: Which compiler are you using right now? Visual Studio 2008?
Should be Visual Studio 2010, if he doesn't changed it. I use Visual Studio 2012 Express.
-
I'm still using VS 2008 express. It seems things get more bloated and less compatible with each new version, so I'm staying old school! :)
-
I'm still using VS 2008 express. It seems things get more bloated and less compatible with each new version, so I'm staying old school! :)
Alright, thank you.
Edit: Updated "serverbrowserGUI.cpp":
- I made searching delayed after pinging the servers.
- I also added the LVS_SHOWSELALWAYS style to g_hServerList because when the main program loses focus the other list views will keep their content, so the selected server should still be visible. Also, it improves how the program behaves when using dialogs.
-
Cool.
Some other suggestions:
- Don't show list of servers when nothing is typed in.
- ESC could close the search window.
-
- Don't show list of servers when nothing is typed in.
I like it to see everything if the search field is empty :P
-
I like it to see everything if the search field is empty :P
What's the point of using the search then? You can see everything without opening the search window. :)
-
In my opinion, the dialog is something like a playerlist with a filter function. It should simply apply that filter to the players and only display players that match - so when the filter is empty, all players match because they are not filtered.
Also, when you open it and it displays all players you have the advantage that you can see all players listed by alphabet in one place and simply go through them to maybe search for a player you know and would like to play with without knowing who exactly you are searching for. In the main window you had to go through all servers in order to do that, which is not as easy as going just through one list.
Actually, I've manually made it find all players when no filter is applied (std::string::find will not match empty strings) because I thought that displaying some information some users might not need or want is a better solution that not displaying information that some players would like to see. The users who do not like to see that information could easily ignore it while the users wanting that information could not just imagine it theirselves.
I will implement some hotkeys like F5 to refresh the search and esc to close the dialog.
Edit: Hotkeys Return and Escape work now.
Edit2:
- F5 update hotkey added
- made dialog resizable
- structured callback function a lot better by splitting up the one callback function into sub functions like OnSearchPlayerDlgUpdate
I'm thinking about turning the ListBox into a ListView because I think it would look a lot better and make the playername more easy to distinguish between playername and servername.
-
There is an update each time i type or remove a character in the search box now. Is that right?
-
There is an update each time i type or remove a character in the search box now. Is that right?
Yes, fixed it.
Edit: Also made the dialog use a listview control instead of a listbox, so the player's name and the server's name are easier to distinguish between now. There might be some translation problems because I used google translator for translating "player" and "on server". The german dialog now looks this way:
(http://s14.directupload.net/images/140308/ykawkhyc.png)