r23340 - Support skinned titlebar for main window
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
41 posts
• Page 2 of 3 • 1, 2, 3
Re: r23340 - Support skinned titlebar for main window
by spr » 30 Sep 2013, 15:07
If it is compatible with the existing JMenu components then that would be pretty cool.drdev wrote:That said, I think I have a workable solution. What if I converted the icon and "Forge" part of the title into a button, which, when clicked, would show the menus (besides the current Forge menu) in a single drop down menu as submenus (with the Restart and Exit Forge items being below a separator in that drop down).
Cheers,
Steve.
Re: r23340 - Support skinned titlebar for main window
by Diogenes » 30 Sep 2013, 15:31
I really like this idea. There would have to be a strong visual indication that the logo is in fact a button, but with the navigation tabs it could tie the UI together nicely around the title bar. An over-sized button with an over-sized drop down menu would help tablet users out, and all menus could be easily accessed by mouse without taking up screen-space. As you said, it would also give more personality to Forge's UI.drdev wrote:That said, I think I have a workable solution. What if I converted the icon and "Forge" part of the title into a button, which, when clicked, would show the menus (besides the current Forge menu) in a single drop down menu as submenus (with the Restart and Exit Forge items being below a separator in that drop down).
I really like the idea of "The Forge Button". I'd probably repaint one of my keyboard keys if this happens.

Re: r23340 - Support skinned titlebar for main window
by spr » 30 Sep 2013, 17:37
If I click the X then the associated action is fired regardless of where my mouse pointer is when I release the button. This means I cannot abort a close. The X should only fire if the mouse down and mouse up events occur with the mouse pointer over X. This is standard behaviour in Windows.
Very minor/cosmetic - the X appears greyish and slightly blurry on my PC. Whereas the minimize and normalize are white.
Cheers,
Steve
Very minor/cosmetic - the X appears greyish and slightly blurry on my PC. Whereas the minimize and normalize are white.
Cheers,
Steve
Re: r23340 - Support skinned titlebar for main window
by drdev » 30 Sep 2013, 17:43
Alright, it sounds like the we're going to have a Forge button.
How does everyone feel about making the Alt key open that menu?
spr, I'll go ahead and fix the minimize, maximize, and close buttons to not trigger when the mouse is released outside them. Just a minor oversight in the initial implementation. Also, the reason the X button appears slightly grayish is because I use anti-aliasing to render it, otherwise it looks terrible if its all a single color.

How does everyone feel about making the Alt key open that menu?
spr, I'll go ahead and fix the minimize, maximize, and close buttons to not trigger when the mouse is released outside them. Just a minor oversight in the initial implementation. Also, the reason the X button appears slightly grayish is because I use anti-aliasing to render it, otherwise it looks terrible if its all a single color.
Last edited by drdev on 30 Sep 2013, 17:58, edited 1 time in total.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: r23340 - Support skinned titlebar for main window
by spr » 30 Sep 2013, 17:57
Check that the ALT key is not being used elsewhere first especially during a match or in combination with the mouse. Also there is a problem with the titlebar on the Mac - viewtopic.php?f=52&t=6333&p=134087#p134077.drdev wrote:How does everyone feel about making the Alt key open that menu?
Cheers,
Steve
Re: r23340 - Support skinned titlebar for main window
by drdev » 30 Sep 2013, 18:14
I will check about the Alt key. As for the problem on Mac, I added a comment to the other thread about needing somebody else to investigate since I don't have access to one.
Also, what should I do about the status message support you built into the menu bar? Would it perhaps make sense to add a thin status bar to the bottom of the window, with the status label on the left side and the digital clock on the right side? That might look better than having the clock on the titlebar next to the minimize button anyway, plus you'll then be able to see it even when the titlebar is hidden (though I could support hiding the status bar just like the titlebar, with it then being shown temporarily if you mouse to the bottom of the screen or a status message is set).
I could also put the build info on that bar now that we're splitting off the Forge button. That way, the navigation tabs would start right next to the Forge button. In that case, should the build info be center aligned? Or perhaps center align the status message instead?
Also, what should I do about the status message support you built into the menu bar? Would it perhaps make sense to add a thin status bar to the bottom of the window, with the status label on the left side and the digital clock on the right side? That might look better than having the clock on the titlebar next to the minimize button anyway, plus you'll then be able to see it even when the titlebar is hidden (though I could support hiding the status bar just like the titlebar, with it then being shown temporarily if you mouse to the bottom of the screen or a status message is set).
I could also put the build info on that bar now that we're splitting off the Forge button. That way, the navigation tabs would start right next to the Forge button. In that case, should the build info be center aligned? Or perhaps center align the status message instead?
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: r23340 - Support skinned titlebar for main window
by spr » 30 Sep 2013, 18:56
As far as I am aware there are no Mac developers. When I had similar issues I used a Mac image running in VirtualBox. Suggest you give that a try.drdev wrote:I will check about the Alt key. As for the problem on Mac, I added a comment to the other thread about needing somebody else to investigate since I don't have access to one.
Just like a windows application then.drdev wrote:Also, what should I do about the status message support you built into the menu bar? Would it perhaps make sense to add a thin status bar to the bottom of the window, with the status label on the left side and the digital clock on the right side? That might look better than having the clock on the titlebar next to the minimize button anyway, plus you'll then be able to see it even when the titlebar is hidden (though I could support hiding the status bar just like the titlebar, with it then being shown temporarily if you mouse to the bottom of the screen or a status message is set).

I think the Forge Button should contain "Forge" or should be the Forge Icon and oversized a bit like (without the menu) -drdev wrote:I could also put the build info on that bar now that we're splitting off the Forge button. That way, the navigation tabs would start right next to the Forge button. In that case, should the build info be center aligned? Or perhaps center align the status message instead?
I think version info should be shown in the status bar or in an About box accessed via the Forge Button. Or possibly below/in/above the logo on the homepage.
Cheers,
Steve
Re: r23340 - Support skinned titlebar for main window
by drdev » 30 Sep 2013, 19:01
I'll look into the Virtual Box idea. Otherwise, since you already have it set up, would you mind investigating a bit?
For the Forge button, my plan was just the icon and "Forge".
As for the status bar, I'll try not to have it look like a Windows status bar too much.
And you're right that making it show temporarily could be weird, so I'll just make it persistent or hidden based on a toggle switch in the menu and perhaps a keyboard shortcut.
For the Forge button, my plan was just the icon and "Forge".
As for the status bar, I'll try not to have it look like a Windows status bar too much.

- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: r23340 - Support skinned titlebar for main window
by friarsol » 05 Oct 2013, 03:27
Did anything ever happen with this? Maximizing still hides my start menu, and if I'm not maximized it's difficult to click the X button. Very frustrating as a very long term dev/user.drdev wrote:As for maximize doing full-screen, that's wasn't intentional on my part, but rather a side-effect of using an undecorated JFrame. I thought it was nice if anything, so I called it a feature rather than a bug. If others would prefer the taskbar still be visible when maximized, or at least have that option, I can try out the workaround here. I could then add a full-screen option to the View menu that uses F11 instead of the current behavior of just hiding the titlebar, and that full-screen option could auto-hide the titlebar and we'd have the drop down when mouse at top of screen solution to access it. Though we might want to move the clock in that case.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: r23340 - Support skinned titlebar for main window
by spr » 05 Oct 2013, 06:45
Also if the overlay is active (eg. card zoomer, end of game summary, etc) it covers the whole window including the titlebar. This is most noticeable when not maximized.friarsol wrote:Did anything ever happen with this? Maximizing still hides my start menu, and if I'm not maximized it's difficult to click the X button. Very frustrating as a very long term dev/user.
Also, if debugging and you stop on a breakpoint the main window is completely unresponsive - you cannot move or resize the window at all. This is not the case with the native titlebar and for those of us with a single monitor it is very useful to be able to rearrange stuff on the fly whilst debugging.
Cheers,
Steve
Re: r23340 - Support skinned titlebar for main window
by drdev » 05 Oct 2013, 14:34
I'll look into it. The feedback from full-screen mode has been mostly positive, so I was focusing on the Forge button and allowing the title bar to be revealed when hidden first.spr wrote:Also if the overlay is active (eg. card zoomer, end of game summary, etc) it covers the whole window including the titlebar. This is most noticeable when not maximized.friarsol wrote:Did anything ever happen with this? Maximizing still hides my start menu, and if I'm not maximized it's difficult to click the X button. Very frustrating as a very long term dev/user.
Also, if debugging and you stop on a breakpoint the main window is completely unresponsive - you cannot move or resize the window at all. This is not the case with the native titlebar and for those of us with a single monitor it is very useful to be able to rearrange stuff on the fly whilst debugging.
Cheers,
Steve
I think what I'm going to do is change F11 to toggle Full-Screen mode (with the menu item being renamed Full-Screen and being moved to the bottom of the Layout menu under Set Window Size) and let the Maximize button just do a normal maximize.
When not in Full-Screen mode (whether maximized or window mode), there will be a button left of the minimize button that also will open Full-Screen mode.
When in Full-Screen mode, the Full-Screen, Minimize, and Restore buttons will be replaced with the clock, a "pin" button that toggles whether the titlebar is locked in position versus hiding unless you mouse to the top of the screen, and an "Exit Full Screen" button.
How does that sound?
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: r23340 - Support skinned titlebar for main window
by drdev » 05 Oct 2013, 22:17
This is intentional. You shouldn't be able to use the navigation tabs or Forge menu while overlays are active. Since they're all temporary and easily dismissed, that should be a problem. Plus it gives those overlays more space.spr wrote:Also if the overlay is active (eg. card zoomer, end of game summary, etc) it covers the whole window including the titlebar. This is most noticeable when not maximized.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: r23340 - Support skinned titlebar for main window
by spr » 05 Oct 2013, 22:49
But you should be able to move the window around using the title bar if not maximized regardless of whether there is an overlay or not. That is what it did previously. The only exeception is if you are displaying a modal dialog. That is just standard windows behaviour.drdev wrote:This is intentional. You shouldn't be able to use the navigation tabs or Forge menu while overlays are active. Since they're all temporary and easily dismissed, that should be a problem. Plus it gives those overlays more space.spr wrote:Also if the overlay is active (eg. card zoomer, end of game summary, etc) it covers the whole window including the titlebar. This is most noticeable when not maximized.
And what about not being able to move the window around when stepping through code? If you are unable to come up with a solution then please add a (dev) option to temporarily disable the skinned titlebar which you mentioned you were going to look into in an earlier post.
Cheers,
Steve
Re: r23340 - Support skinned titlebar for main window
by drdev » 05 Oct 2013, 23:04
Ok, fair point. I wasn't thinking about the move behavior during an overlay. I'll see what I can do about preventing the titlebar being covered by overlays.
As for being able to move the window while stepping through code, all you need to do is Shift+Right click on the Forge icon and the taskbar, click Move, and use the arrow keys. I've also just committed a fix so the taskbar isn't hidden when maximized (r23411), so hopefully debugging will be easier on single monitor setups anyway.
As for being able to move the window while stepping through code, all you need to do is Shift+Right click on the Forge icon and the taskbar, click Move, and use the arrow keys. I've also just committed a fix so the taskbar isn't hidden when maximized (r23411), so hopefully debugging will be easier on single monitor setups anyway.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: r23340 - Support skinned titlebar for main window
by drdev » 07 Oct 2013, 07:44
spr, friarsol, I've committed several changes to address the issues you've brought up here. Thanks for the input.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
41 posts
• Page 2 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 18 guests