FryGUI screen question?

BlitzMax Forums/BlitzMax Module Tweaks/FryGUI screen question?

Dabhand(Posted 2008) [#1]
Can you change the size of a FryGUI screen, basically, I want to roughly chop the main screen in half, one half graphics, the other GUI... Baring in mind, the graphics part must appear behind the GUI.

I've looked at the SetResolution command but that appears to do nothing here?

Any ideas? tar


plash(Posted 2008) [#2]
You can set the screen size to as large as you want, and just make a panel the size of half your screen.

example:
SuperStrict

Import Fry.FryGUI

'SetGraphicsDriver D3D7Max2DDriver()
SetGraphicsDriver GLMax2DDriver()

Graphics 1024, 768, 0, 0
'this can be set to the panel size later on
fry_SetResolution(1024, 768)
fry_SystemCursor(False)
SetBlend ALPHABLEND

fry_LoadSkin("Skin")
fry_AddFont("Default", "trebucbd.ttf", 13)

Local screen1:fry_TScreen = fry_CreateScreen("Screen 1")
Local panel1:fry_TPanel = fry_CreatePanel("panel 1", 10, 15, 325, 680)
	panel1.HexColour("505080")
	screen1.AddPanel(panel1)

Local leftlabel:fry_TLabel = fry_CreateLabel("Left", "Top-Left Aligned Label", 5, 5, 100, 20, 0, 0, panel1)
	leftlabel.HexTextColour("FFFFFF")

fry_SetScreen("Screen 1")
While Not KeyHit(KEY_ESCAPE)	
   Cls
	'draw your stuff before you draw the gui
	SetScale 20.0, 20.0
	DrawText "Hello!", 200, 400
	
	'draw the gui
	SetScale 1.0, 1.0
	fry_Refresh()
	
   Flip
Wend


And this is not in the right forum, as it does not have anything to do with a module tweak.


Dabhand(Posted 2008) [#3]
Thanks Plash... lol, I didnt realise I posted this in here.. No wonder I couldnt find it! hehehe


plash(Posted 2008) [#4]
np :-)