by date
Minor Update and GuiWindowCtrl Gripe/Fix?
Minor Update and GuiWindowCtrl Gripe/Fix?
| Name: | Rob Parton | ![]() |
|---|---|---|
| Date Posted: | Feb 02, 2007 | |
| Rating: | 4.7 out of 5 | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Rob Parton |
Blog post
Today, for the first time in a few weeks I had a chance to mess around with some interface stuff. I haven't had much of a chance in the last month or so since moving again, but I did have lots of time to think.
The first was to do an interestly different window frame. After some suggestions from a few friends I did come up with something. Namely, this:

Not too bad, kinda pretty. However, I did realize something very quickly. I was having issues when trying to drag the window around. After a bit of frustration I decided to look at the actual source, and found the following in GuiWindowCtrl::onWake()....
That would be why mine wasn't working particularly well! So, I changed it to...
There! Now the zones for resizing and moving the window are based on the specific skin and not hard coded!
Huzzah!
The first was to do an interestly different window frame. After some suggestions from a few friends I did come up with something. Namely, this:

Not too bad, kinda pretty. However, I did realize something very quickly. I was having issues when trying to drag the window around. After a bit of frustration I decided to look at the actual source, and found the following in GuiWindowCtrl::onWake()....
mTitleHeight = buttonHeight + 4;
mResizeRightWidth = mTitleHeight / 2;
mResizeBottomHeight = mTitleHeight / 2;
That would be why mine wasn't working particularly well! So, I changed it to...
mTitleHeight = mBitmapBounds[BorderTopLeftKey].extent.y;
mResizeRightWidth = mBitmapBounds[BorderRight].extent.x;
mResizeBottomHeight = mBitmapBounds[BorderBottom].extent.y;
There! Now the zones for resizing and moving the window are based on the specific skin and not hard coded!
Huzzah!
Recent Blog Posts
| List: | 10/04/07 - Thoughtbomb 03/06/07 - Frustration can be a good thing 02/02/07 - Minor Update and GuiWindowCtrl Gripe/Fix? 01/02/07 - New Year brings new things! 09/24/06 - Musings and Future Plans 09/03/06 - Time gets in the way 08/19/06 - GuiSkinnedButton Test #1 08/14/06 - Moving Day & UI Component Ideas |
|---|
Submit your own resources!| Gustavo Boni (Feb 02, 2007 at 01:12 GMT) |
| James Spellman (Feb 02, 2007 at 05:54 GMT) |
You must be a member and be logged in to either append comments or rate this resource.



4.7 out of 5


