Widescreen + GUI = :(

Blitz3D Forums/Blitz3D Programming/Widescreen + GUI = :(

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Excellent, I cracked it! :)

Shawn, you may or may not want to add this addition to your code.

; start widescreen setup
If Lower(fakewidescreen)="yes" Then ScaleEntity cam,1.25,1,1  ; stretch viewport for 'fake widescreen'
Global GUIpixel# = 1 ; setup gui squishing for widescreen
If Lower(fakewidescreen)="yes" Then GUIpixel = 0.75   ; define 0.75 width for GUI widescreen
If Float(screenwidth)/Float(screenheight)>1.4 Then GUIpixel = 0.75  ; define 0.75 width for GUI widescreen
This is where I setup my widescreen width. I have 'fake widescreen' which is basically anamorphic output, as well as proper widescreen. Stupidly, I had no idea that I needed to add 'Float' to each number I divided by, so that gave me some trouble... I've never needed that before.

CW# = ThisFont\Character_Width#[ThisChar]*GUIpixel
The '*GUIpixel' is the only part I added to the sswift code. I also added the same thing to all sections that call GUI_CreateSprite in my own code, which was a pretty easy way to handle it. This does the job really nicely. I changed some of my alignment to work by centre instead of left side, and it works okay now.