Author Topic: Feature: Serverbrowser: movable divider between upper and lower part  (Read 8033 times)

cRzcCs

  • PGP
  • Posts: 2
Hello DP2 community!
I just started playing this game this week, and I like it a lot!
While looking at the serverbrowser, I noticed that when I make the window bigger (vertically), both parts (upper/lower) get bigger by the same amount.
If the window is on full height (at least on my monitor) I still cannot see all servers, but I got free space in the lower part. Could you implement it that way so one could "move the divider" between the two parts, so the lower part must not be strictly 50% of the available space?

To show exactly what I mean, I added a picture of it :)

Greetings,
cRzcCs

rafalluz

  • VM-68
  • Posts: 131
Re: [Feature] Serverbrowser: movable divider between upper and lower part
« Reply #1 on: February 06, 2011, 06:05:25 PM »
It should have been integrated into game. anyways

cRzcCs

  • PGP
  • Posts: 2
Re: [Feature] Serverbrowser: movable divider between upper and lower part
« Reply #2 on: February 06, 2011, 06:46:15 PM »
I do agree that the ingame browser should be worked over… Especially regarding the long server names, so you can't see which one you will be joining, but that is another feature request.

For my own uses, I also like to use the external browser, just doubleclicking the server that appeals to me the most and the game starts…

jitspoe

  • Administrator
  • Autococker
  • Posts: 18801

xrichardx

  • 68 Carbine
  • Posts: 295
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #4 on: February 15, 2014, 09:14:44 PM »
I've tried it and my problem is: This will pretty much cause flickering and until now I know no way of circumventing that. I don' know what's better - flickering on resizing or no seperators at all, so I'll let others decide and not upload these changes to the cvs repository. Still, I've put it into the serverbrowser, the modified executable and a patch for the source (if someone wants to experiment with it (T3RR0R15T ;))) is applied.

Things should be done before really implementing this into the repository:
- do sth. against the flickering?
- make the "hitbox" of the seperators larger, they are hard to hit now
- change the cursor when hovering the hitbox
- make the dividers look nicer (sth. like the SS_ETCHEDXXX styles)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18801
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #5 on: February 15, 2014, 10:49:39 PM »
Is the flickering when moving the divider any different than when resizing the whole window on the old server browser?

xrichardx

  • 68 Carbine
  • Posts: 295
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #6 on: February 16, 2014, 06:53:06 AM »
It was more, but I've managed to remove any flickering that was caused by the dividers. Now, there should only be flickering that is already in the current version. Some things are still buggy (for example the vertical divider when resizing the window), I'll try to fix them.

Again, executable and patch for cvs at current state attached, I think it's still too buggy to add it to the repository.

xrichardx

  • 68 Carbine
  • Posts: 295
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #7 on: February 17, 2014, 04:05:33 PM »
I've improved the flickering a little bit more and also made the hitbox larger - but I failed at adding a different cursor to the divider. My problem: The WM_SETCURSOR message, which is needed to set a cursor for a window, won't be sent unless the static has the SS_NOTIFY style, but the SS_NOTIFY style will eat all mouse messages. I tried subclassing it so it would handle all messages the way I want it to and it compiled fine but behaved completely unpredictable, for example altering code that was called after an if statement changed if the code in the if statement was run or not. Probably it was a simple mistake that I would not see because I made it. Anyway, I've again attached my current state of work.

Still to do:
- Make separators look nicer?
- Change cursor on the separator (the resize NS and WE cursors should be just fine)

Edit: Made a screenshot so giving feedback is possible without downloading it:

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #8 on: February 17, 2014, 04:18:26 PM »
I can't move it back (upwards), if it gets lower than the status bar.

xrichardx

  • 68 Carbine
  • Posts: 295
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #9 on: February 24, 2014, 01:13:41 PM »
I can't move it back (upwards), if it gets lower than the status bar.
Thank you, fixed that.

Researching about the flickering issue I came across the LVS_EX_DOUBLEBUFFER listview style which will automatically make it double buffer it's content and thereby eliminate all flickering on the list views. The only problem is that this was first included in the common controls library in version 6, so you would have to drop support for windows versions older than windows xp. I don't know if that's OK...
Still, I applied it, patch and executable attached.


jitspoe

  • Administrator
  • Autococker
  • Posts: 18801
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #10 on: February 25, 2014, 05:53:39 PM »
That's probably fine.  I imagine it would still function, but just not have that style, right?  I doubt many people are using the external server browser on windows versions < XP, anyway.

xrichardx

  • 68 Carbine
  • Posts: 295
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #11 on: February 28, 2014, 05:41:02 PM »
I tested it:
Win 98: No support, VS2008 does not compile with win98 support anymore (so current official version also won't run)
Win 2k: As you said, it will run but also flicker a little bit more
later windows version: It will not flicker, but resizing may fell a bit choppy / low FPS caused by double buffering. Still, I think it looks much better than when it flickers.

Screenshot Win2000 vs Win 7 attached as well as patch and executable of current state of work.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18801
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #12 on: February 28, 2014, 11:58:32 PM »
I think the win98 optimization is no longer supported, but I thought it would still run on win98.  I haven't booted my old win98 machine up in a long time to test, though. :)  Did you actually try running on Win98?

It's too bad there's not a way to keep the thin line but have a larger "grabable" area.  The thin line looks better, in my opinion.  Maybe we can color it so that it has a 1px black border and the window color in between so it's not a solid black or grey area?

Thanks for working on this, by the way.

xrichardx

  • 68 Carbine
  • Posts: 295
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #13 on: March 01, 2014, 07:42:06 AM »
Does this look better? I've made the static transparent and simply drew a line in the WM_PAINT handler.
I also managed to properly set the right cursor on both dividers so the hit feedback is much better now - and it was so incredibly easy.

Edit: Added picture of what happens when I try to start the build 40 serverbrowser in a win98 VM. The left error could be related to the fact that the program is running in a VM, but the right one should be the same on a real machine.

not_payl_obviously

  • 68 Carbine
  • Posts: 415
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #14 on: March 01, 2014, 01:58:06 PM »
Edit: Added picture of what happens when I try to start the build 40 serverbrowser in a win98 VM. The left error could be related to the fact that the program is running in a VM, but the right one should be the same on a real machine.
I would guess both errors mean intercourse you. Generally trying to run anything newer on 98 is bad, I remember once I tried to run bunch of things on it, some programs were just displaying weird error messages (none had any relation to what I was trying to do), some error messages+"Upgrade", and sometimes even "Upgrade"+error messages. On 98/95 anything goes, except running applications.
Too bad you haven't tried to run paintball there, I would vote it would not run too.
Right error message would mean that PE EXE fields are set too high for 98/95 to even try to run it (But as anything goes, there had to be some error), so it pretty much means that anything compiled in this compiler in this mode would produce almost same result. And this is case for most applications that are compiled nowadays so I would say stop caring about anything below Vista or XP if you are archaeologist. Otherwise I will require you to publish also 16bit version so I can run it on my Win 3.11 I have and version for DOS 3 (to run Windows 1 with DP on it).
So no idea why care about XP even, but maybe you still live in nineties.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18801
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #15 on: March 02, 2014, 10:52:19 PM »
The single line looks a lot better.

As for supporting older versions of windows, I definitely want to support XP.  Lots of people still use that. I honestly don't see 7 being much of an improvement (worse, in a lot of cases, like sound drivers...).  I'd still use XP if I didn't need the extra memory.

xrichardx

  • 68 Carbine
  • Posts: 295
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #16 on: March 07, 2014, 05:12:01 PM »
I've just checked some other applications and many (fox example teamspeak, visual studio, my irc client etc.) just leave empty space that is dragable. That would look this way:



What do you think about that?
And am I free to upload this to the repository?

jitspoe

  • Administrator
  • Autococker
  • Posts: 18801
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #17 on: March 07, 2014, 06:41:23 PM »
Either one is fine.  I just didn't like the thick, solid-color one.  Go for it!  I was about to ask if you had submitted your latest changes.

xrichardx

  • 68 Carbine
  • Posts: 295
Re: Feature: Serverbrowser: movable divider between upper and lower part
« Reply #18 on: March 07, 2014, 09:28:51 PM »
submitted it :).