Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
Offline elasto  
#25 Posted : Monday, June 10, 2013 9:31:52 AM(UTC)
elasto

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
I think when you set the size it's including the size of the title bar, so you have to make it a little bigger if you want 640x480 actually available for rendering (presumably 640x496 :) )

Offline internetfreak  
#26 Posted : Monday, June 10, 2013 11:34:16 AM(UTC)
internetfreak

Joined: 12/19/2011(UTC)
Posts: 529

Thanks: 10 times
Was thanked: 16 time(s) in 15 post(s)
Ok that sounds like a good reason for this behavior. Could this maybe be changed, I like to set the view port size without having to care about the window border and title bar :)
Mein Blog: www.internetfreak.net

- Inoffizieller DeltaEngine-Supporter und Tutorialschreiber -
Offline elasto  
#27 Posted : Monday, June 10, 2013 11:41:59 AM(UTC)
elasto

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
Looking at it, there's TotalPixelSize and ViewportPixelSize. TotalPixelSize will include the titlebar and ViewportPixelSize wont.

Currently TotalPixelSize is settable and ViewportPixelSize is not.

It would seem to me at first glance we could make ViewportPixelSize settable, making it deduce the height of the titlebar via (TotalPixelSize - ViewportPixelSize) and then set TotalPixelSize for you.
Offline internetfreak  
#28 Posted : Monday, June 10, 2013 11:59:51 AM(UTC)
internetfreak

Joined: 12/19/2011(UTC)
Posts: 529

Thanks: 10 times
Was thanked: 16 time(s) in 15 post(s)
Ok so with ViewPortSize I can set the size which I want and then the border gets added and set as TotalSize? That would be a good solution because I'd like to set the size which my viewport should have so I can rely on that setting :)
Mein Blog: www.internetfreak.net

- Inoffizieller DeltaEngine-Supporter und Tutorialschreiber -
Offline elasto  
#29 Posted : Monday, June 10, 2013 12:04:19 PM(UTC)
elasto

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
Yeah. I'm coding it now. If it passes peer review it'll be in this week's release.

For now you could try it out yourself too - would help me verify my understanding is right!

Code:
Size borderSize = window.TotalPixelSize - window.ViewportPixelSize;
window.TotalPixelSize = desiredViewportSize + borderSize

Edited by user Monday, June 10, 2013 12:05:04 PM(UTC)  | Reason: Not specified

Offline internetfreak  
#30 Posted : Monday, June 10, 2013 12:57:09 PM(UTC)
internetfreak

Joined: 12/19/2011(UTC)
Posts: 529

Thanks: 10 times
Was thanked: 16 time(s) in 15 post(s)
Good news, I implemented it as local delta patch (in the appropriate assembly) and tested it successfully :)
Now I hope that it gets approved

One question which is ot: How can I close the game window? I didn't find the necessary clue to achieve it
Mein Blog: www.internetfreak.net

- Inoffizieller DeltaEngine-Supporter und Tutorialschreiber -
Offline elasto  
#31 Posted : Monday, June 10, 2013 1:11:16 PM(UTC)
elasto

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
Easiest way is just to call Window.Dispose :)
Offline internetfreak  
#32 Posted : Monday, June 10, 2013 1:40:31 PM(UTC)
internetfreak

Joined: 12/19/2011(UTC)
Posts: 529

Thanks: 10 times
Was thanked: 16 time(s) in 15 post(s)
Here' a screen which proves that your addition works (ok, I could have faked it, but it's really working ;) )
It's a bit messy on the map but I just messed around with my engine to