IGlass gui for blitzmax

BlitzMax Forums/BlitzMax Programming/IGlass gui for blitzmax

Filax(Posted 2005) [#1]


version 1.5 release 1
by Phillipe Agnisola (C)2005

-------------
Introduction :
-------------
IGlass is a library for BlitzMax PC and MAC programmers,
it was designed to set up quickly a GUI for your
own projects. This GUI is fully skinable with
your hown png bitmap.

Note : The mac version is an Alpha version (due to little
bug with mac version of blitzmax)

Visit my page :
http://www.blitz3dfr.com/phpfrench/content.php?content.46

Download IGlass demo :
http://www.blitz3dfr.com/phpfrench/request.php?30




skn3(Posted 2005) [#2]
Very nice design, might be good to impliment the clipboard plus text hilighting/inserting/etc/etc


Filax(Posted 2005) [#3]
I know :) there is many task to do ... :)


SillyPutty(Posted 2005) [#4]
where do I get this ? Is it released ?


Barnabius(Posted 2005) [#5]
Well... Some time ago I've purchased BCF GUI also made by Filax and I must admit I did not think long before placing my order for the iGlass GUI. It was sent to me in less than half hour after purchase and I am spending my afternoon playing with it. It's obvious there's plenty more to do but what is available so far works without any problems. The package includes additional skins and they are all done in Filax's high quality graphics style.

I am looking forward to working with this very nice and useful GUI library.

Barney


SillyPutty(Posted 2005) [#6]
EDIT* sorry, I was being stupid :)


Filax(Posted 2005) [#7]
No problem Deux :)

Many thanks barnabius :) i hope you will like it :)


Alienforce(Posted 2005) [#8]
Superdupercool Filax, GREAT!!!!

What´s next..

/Alienforce


RexRhino(Posted 2005) [#9]
I downloaded the demos... what I want to know is how easy it is to create custom skins? Obviosly if I were to use this for a game, I would want to skin the system to match the theme of my game. Could you post an example skin png?

Also, is there a full text edit area support, for something like sending an email?

Cool looking stuff!

RexRhino


Dreamora(Posted 2005) [#10]
Nice :)
Although it would be better to have them in windowed mode for widescreen users :)


1 suggestion: some kind of fps counter ... seeing a gui working without it does not give any indication on its actual performance for real usage.


Paul "Taiphoz"(Posted 2005) [#11]
how easy is it to alter or add your own skin, I also have one of his products and would be willing to buy this depending on how easy I can make it look like a normal windows XP gui or how easy I can give it my own distinct look.


Filax(Posted 2005) [#12]
Yes you can modifiy an existing gui for create, some new, very easily
you can redesign window title, background all color ! etc ... all is fully
customisable ! IGlass use png file for design your hown gui.

Dreamora : I don't understand very well ? each demo have a FPS counter :)

but IGlass is very speed :)


Beaker(Posted 2005) [#13]
Nice job filax.


Booticus(Posted 2005) [#14]
Hey Filax! Can I use regular blitmax2d commands with it? Like drawimage,drawrect, etc? Or am I limited to using only the OpenGL commands?


ftbass(Posted 2005) [#15]
I use 2D commands without any problems :)


Filax(Posted 2005) [#16]
Booticus : Without problem ! Iglass use standard bmax
command :)


Booticus(Posted 2005) [#17]
NO WAY! Thats awesome! I'll snatch it up with the quickness!


RepeatUntil(Posted 2005) [#18]
Congratulation Filax. This GUI is superb!!


Paul "Taiphoz"(Posted 2005) [#19]
yeah I have to agree, after looking at the demos, and playing around with it, its clear this is a really good gui..

I do have another question tho.

will it support window mode ? with drop down file menus and such ?

Probably a daft question but all the demo's were full screen so i thought id ask.


Filax(Posted 2005) [#20]
Of course ! windows mode supported i have make the demo in full
screen because it's so fast. But IGlass support Windowed mode.


Robert(Posted 2005) [#21]
Of course ! windows mode supported i have make the demo in full
screen because it's so fast.


It struggles a little at high resolutions (1024x768 plus). When you move a window around which contains a listbox, the items in the listbox seem to trail the window.


Filax(Posted 2005) [#22]
Problem solved robert. Thanks for this reply :)

And if you redownload my demo you can see an example
in windowed mode "Example IGlass Tab"


SillyPutty(Posted 2005) [#23]
hell, I AM gonna buy this product

filax, hopefully you will keep this awsome product updated !!!


Filax(Posted 2005) [#24]
Don't panic :) i have buy a mac mini for make translation with
mac os X :)

PS : All my customer's are happy about services :)


GW(Posted 2005) [#25]
The Gui looks very nice, Good job!
The framerates leave a lot to be desired though.
Do you plan to later go back refactor things for speed?


Filax(Posted 2005) [#26]
IGlass slow ?? i don't know :) i have try to optimize at maximum
my GUI but i think Mark must speed up a little bit the 2D fonctions


PowerPC603(Posted 2005) [#27]
IGlass is really a top-of-the-notch GUI, if you ask me.
I looked at the demo (found the "Example IGlass Demo.exe" to be the best, as it shows everything), it runs at max resolution (1280x1024x32) at a steady 146fps and I ordered the full version on SHARE-IT within 5 minutes.

I also took a look at your other projects (I didn't know that all those perfect demos were all your doing) and have to admit: you're the best :-)

Thanks for this superb GUI.


SillyPutty(Posted 2005) [#28]
@Power, is it easy to use etc... does it meet expectations ? sorry for the dumb q, but I want to buy it, just wanna here your thoughts,you have any demos you made ?


Filax(Posted 2005) [#29]
Deux :) this is an example to make a window and a button look this
code he is very simple to learn only 7 line of code for setup gui
and use interface :




PowerPC603(Posted 2005) [#30]
I cannot use the GUI yet, as I selected Wire Transfer as payment option, and it takes nearly a week before SHARE-IT will get my payment.
So, I didn't have a chance yet to try it out myself.
But the demos are great.
I suppose they were compiled using the full release (v1.09) of BlitzMax?

Does the package come with full documentation about each command/method?
And is the source-code for those 5 demo-exes also included?


Filax(Posted 2005) [#31]
Don't panic :) i glass i bundled with many simple examples (20)
the doc is english and french and EACH command are explain
with a little example.

And of courses all demo have the source code included.


BlitzSupport(Posted 2005) [#32]
Stunning! One bug I found is that if you click on a button but keep holding the mouse down, then move it outside the button and let go, the window gets locked in place (you can't drag it by its title bar), until you click and release another button 'normally'.


RexRhino(Posted 2005) [#33]
It looks like a really cool product, and I placed my order 5 minutes ago.

One thing that might help show how good the product is would be a game type skin. Most people are using blitz to make games or some other product like that.

If you want to show off how the product can be used, I would create several example skins that fit in with a game theme. Maybe create a "Dragons and Fantasy" skin, or a "sci-fi game" skin, or perhaps a "Military" skin. That way we get a feel of how it would look in a game.


Filax(Posted 2005) [#34]
BlitzSUpport : Can you clarify ? what exemple generate this bug ?
because i don't understand very well ? on the standar button ?
windows buttons ?


Filax(Posted 2005) [#35]
Ok bug solved :) thanks blitzsupport :)


Daz(Posted 2005) [#36]
Filax,

Just in case anybody else has reported a similar problem with IGlass, please read my post on this thread:
http://www.blitzbasic.com/Community/posts.php?topic=46764

It is regarding me getting corruption with text. Whenever any text is rendered the characters I, i and l (lower case L) gets displayed at only half the height it should be. I want to point out it appears to be a prlbme with BMax (or, more likely, combination of BMax (GL issue) and my graphics card) rather than your excellent IGlass GUI.

Cheers.
Daz.


GregBUG(Posted 2005) [#37]
i just purchased iGlass
and i must tell that this gui is very Easy to use
and the speed is good! (i'm using it to make an "editor" for my project!)


Good work Filax!


Filax(Posted 2005) [#38]
Many thanks :)


RexRhino(Posted 2005) [#39]
Hey, I ordered iGlass, but instead of sending me iGlass you sent me the free GUI editor for iGlass!


Filax(Posted 2005) [#40]
lol :) are you sure ? do you look look inside attached email
zip file ? because i have verify the email that i have send to
you, there is IGlass zip under zip file !


RexRhino(Posted 2005) [#41]
Just so people know, Filax sent me the right file... I just made a stupid mistake and was looking at the wrong file. Thanks for your help Filax! Great product!


Filax(Posted 2005) [#42]
No problem :)


Filax(Posted 2005) [#43]
Cool news :) i have made an alpha version of the mac os x
version. But due to some little bug between IGLASS and
blitzmax mac version, i hope offer a full mac release
the last week.For the moment this version run to 95%
correctly.


SteAbra(Posted 2005) [#44]
cool! mac osx version ;-)
my order is on it's way ...

keep up the good work filax!

stephan


hub(Posted 2005) [#45]
Filax, do you project to implement treewiew gadget ?


Filax(Posted 2005) [#46]
SUre :) but not now because i must make convertion mac fully before


amonite(Posted 2005) [#47]
I LOVE IGLASS :)

- great work here fellow Filax !!


Filax(Posted 2005) [#48]
lol :) thanks :)


Hummelpups(Posted 2005) [#49]
Does iGlass work with irrlichtBMX? If yes than I think I gonna buy it.


N(Posted 2005) [#50]
Steam: I don't own a copy of a iGlass (nor will I), but given a proper knowledge of OpenGL it should. All you should need to do is, after rendering and before swapping the buffers, push a new projection matrix onto the stack then make it an orthographic projection, then return to the modelview matrix, push a new identity matrix onto it. After that, you'll probably want to push new attribs onto the stack and reset stuff like blend modes and such. After which, you should be able to render with iGlass.

Obviously, you'll want to pop all the matrices and attribute changes when done.

If you're running Irrlicht with the D3D or Software renderer though, then you're pretty screwed obviously.


Filax(Posted 2005) [#51]
if you use an opengl code to open your graphics screen i don't know !
but it work perfectly with blitzmax graphics command.


Booticus(Posted 2005) [#52]
This is such a great tool! I am so pleased with it! Took some minor fiddling to get my existing graphics working correctly (mostly 'settextimage' and 'set alphablend') but MAN! ITS GREAT!!! The existing GUI graphics are top notch, and I can throw my own feeble attempts at buttons and window backgrounds in with ease! EASE I TELL YOU! FANTASTIC FILAX! WORTH EVERY DOLLAR (or Euro! ;) )


Filax(Posted 2005) [#53]
Lol :) what shouts of joy :) im happy if you like my GUI...
If you make a nice skin can you post a screenshot ?
I'm curious to see what the user's do :)

I'm thinking to an opengl version wo work with some 3D engine like
irrlicht or other but i must re-write some part of code because the
max 2D commands are not compatible with a pure opengl template.

Let's go filax :) go to work :)


SteAbra(Posted 2005) [#54]
hey filax ... not to much at a time ;-)
first make your cool IGlass mac-compatible ... :)

stephan


Filax(Posted 2005) [#55]
Don't panic :) i'm working on but i'm waiting for the next mac blitzmax
release before :( because for the moment it's not ready to compile.....
move your ass mark :)


Filax(Posted 2005) [#56]
IMPORTANT MESSAGE FOR : chris graham

You have register IGlass with a bad email adress ! i can't
send your licence !

If you see this message contact me quick, but i have not
other method to contact you !


PowerPC603(Posted 2005) [#57]
When I get the download link for your GUI from SHARE-IT and you send me the license, am I (and others who bought your GUI) entitled to get free updates as they come?

If you implemented the said TreeView component, do we have to pay extra for this or can we download the latest version without extra cost?

Greetings.


Filax(Posted 2005) [#58]
Of course ! lol !

all updates are free and you benefit of other control in the GUI.
and for example if a user send me a bugfix or a new stuff to put
under IGlass all the user's have it :)

You must understand that IGLass is a package!
it never was in my policy to make pay updates!

Don't worry.

PS : I prefer to make an opened system, rather than of reserved to
an elite.


twistedcube(Posted 2005) [#59]
Filax. Its chris I sent you an email with my correct e-mail adress which is weird considering share-it had no problems emailing me my copy of the bill etc. Any further problems please let me know


Filax(Posted 2005) [#60]
Hi chris i have many problem with your mail adress :( my smtp server return an error each time ! see my smtp log :

Can you give me another email adress like hotmail etc ??

Cheers

PS : I receive well your message but i can't reply !

------------------------------------------------------------------------------------------
This is the SMTP Server program at host wanadoo.fr.

I'm sorry to have to inform you that your message could not be
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The SMTP Server program
------------------------------------------------------------------------------------------


twistedcube(Posted 2005) [#61]
Here just signed up for this give this a shot:

twistedcubedesign@...

chris


Filax(Posted 2005) [#62]
I do :) check your email :)

Pfiuuuu ! "i find it so hard work to communicate with you"
like say the music band 'Archive' :)


twistedcube(Posted 2005) [#63]
Yup dloading in now. THanks. My be my providers spam blocking system if you are sending it through an automated system.

Chris


Muttley(Posted 2005) [#64]
Just had a look at the demos on your site, and this looks awesome. Congratulations. :)

Muttley


Dreamora(Posted 2005) [#65]
filax: sounds you have the same kind of hoster I had before I left them. The mailserver does a full relay test on sending. The bad thing is that a lot of free mailservices and even more private hosters don't do it which leads to a mail incapability.


Filax(Posted 2005) [#66]
I have a dream :

"Free isp :) with mega upload and no spam..." :)


Filax(Posted 2005) [#67]
Pfiuu :) i have release the first mac version :) there is some little bug
but the gui is functional. happy day ...


twistedcube(Posted 2005) [#68]
Now upon playing with IGlass. (which by the way is great) I am having a problem every caption or window title I make the text appears to be shifted up about 10 pixels from where it should be be centered where it should in the button or title bar of the windows. Yet when I run the examples I do not have the same problem. But I can't the decrepetcy in my code that would cause this to happen


Booticus(Posted 2005) [#69]
I think you have to throw the fonts that came with iGlass in the root folder you're saving out to. I think they were the blitz font and the arial.fon?? The same thing was happening to me till I moved those fonts in there!


Filax(Posted 2005) [#70]
Yes copy the two font in your exe directory, why ?

Because blitzmax seem to have a problem with font INCBIN...
the only solution for the moment is to let the file alone.


Scott Shaver(Posted 2005) [#71]
Okay I just bought this and I'm waiting for it to show up in my email. How do we go about getting updates as they are released? Will they be sent automatically to the same email address?

Also how do go about getting the version for the different platforms? I use a Mac Mini at home and Windows at work. I assume there will be a linux version soon as well.


Scott Shaver(Posted 2005) [#72]
I received the Mac version, now where is the Windows version?


Filax(Posted 2005) [#73]
I have send two email. The first attached file is the PC version and in
the second mail this is the mac version.

Regards :)

Of course i'll change your email adress for futur release :)


Scott Shaver(Posted 2005) [#74]
thank you very much. :)


kmac(Posted 2005) [#75]
With BM1.10 I now get a black screen...


Filax(Posted 2005) [#76]
Argh :) i'll try to install it this day and make the changes :)
don't panic :)


SillyPutty(Posted 2005) [#77]
filax, will you supprt the new dx framework

if so i will buy it asap.


Filax(Posted 2005) [#78]
dx framework ? hum, i don't know ! but for the moment
i'm working on the translation for the version 1.10

Grrrrr mark .... For IGlass user's :

If your example made black screen try to comment :

' ------------------
' Deactivate synchro
' ------------------
'bglSetSwapInterval(0)

And replace

' ------------------------
' Swap buffer and flushmem
' ------------------------
' bglSwapBuffers()

By the FLIP command.


SillyPutty(Posted 2005) [#79]
the dx framework is in the new update

brl.d3d7max2d


Filax(Posted 2005) [#80]
The Iglass release coming soon.


SillyPutty(Posted 2005) [#81]
filax, if i were to purchase, is there another of getting the software from you ?

my work mail blocks all attachments, and share-it does not send to gmail.


Filax(Posted 2005) [#82]
Deux : Good news i have try to use :

' --------------------------
' Load IGL gui ! important !
' --------------------------
Include "./IGL_Classe/Inc_IGlass.bmx"

SetGraphicsDriver (D3D7Max2DDriver())

' ------------
' Open graphic
' ------------
Graphics 800,600,32

Seem to work !!!

And for the email i have not other method for delivering IGlass !
Maybe an account on hotmail ? :) hotmail work perfetly with
share it


SillyPutty(Posted 2005) [#83]
ok cool dude,

gonna try and order now, how long does it take ?


Filax(Posted 2005) [#84]
when i'm go home :) i'm at job for the moment.


Cartman(Posted 2005) [#85]
Great product. I'm loving using it. It's saving me tons of time and I highly recommend it.


Filax(Posted 2005) [#86]
Hi all

I have make all debug for 1.10 version. I think release MAC & PC
version at the end of the week. (Soon as possible)

A++


SillyPutty(Posted 2005) [#87]
ok, i have bought it.

Would i receive it today ? I have "plans" for the weekend :)


Filax(Posted 2005) [#88]
release coming don't panic :)

when share it send me email a send my product
soon as possible (1 / 3 hours)

Show worklog for changes

http://www.blitzbasic.com/logs/userlog.php?log=482&user=2162


Scott Shaver(Posted 2005) [#89]
Suggestion: IGL_ScreenSelector

1> option to not display the refresh rate list.
2> provide complete list of refresh rates not just 60 and 75.
3> option to not auto-enter the selected graphics mode, give a way to find out what the user selected so we can set up the graphics mode ourselves.
4> use loops to determine the correct list of graphics modes instead of hard coding them.

example:

Const sizeCount:Int = 5
Global widthHeight:Int[sizeCount,2]
widthHeight[0,0]=640
widthHeight[0,1]=480
widthHeight[1,0]=800
widthHeight[1,1]=600
widthHeight[2,0]=1024
widthHeight[2,1]=768
widthHeight[3,0]=1280
widthHeight[3,1]=1024
widthHeight[4,0]=1600
widthHeight[4,1]=1200

Const depthCount:Int = 3
Global bitDepth:Int[depthCount]
bitDepth[0]=16
bitDepth[1]=24
bitDepth[2]=32

Const rateCount:Int = 9
Global refreshRate:Int[rateCount]
refreshRate[0]=50
refreshRate[1]=60
refreshRate[2]=70
refreshRate[3]=72
refreshRate[4]=75
refreshRate[5]=80
refreshRate[6]=85
refreshRate[7]=100
refreshRate[8]=120


For size = 0 Until sizeCount
	For depth = 0 Until depthCount
		For rate = 0 Until rateCount
			If GraphicsModeExists(widthHeight[size,0],widthHeight[size,1],bitDepth[depth],refreshRate[rate]) Then 
				DebugLog widthHeight[size,0] + "x" +  widthHeight[size,1] + "x" + bitDepth[depth] + "@" + refreshRate[rate]
			EndIf
		Next
	Next
Next



gives me this output on my machine

640x480x16@60
640x480x16@75
640x480x16@85
640x480x32@60
640x480x32@75
640x480x32@85
800x600x16@60
800x600x16@75
800x600x16@85
800x600x32@60
800x600x32@75
800x600x32@85
1024x768x16@60
1024x768x16@75
1024x768x16@85
1024x768x32@60
1024x768x32@75
1024x768x32@85
1280x1024x16@60
1280x1024x16@75
1280x1024x16@85
1280x1024x32@60
1280x1024x32@75
1280x1024x32@85
1600x1200x16@60
1600x1200x16@75
1600x1200x32@60
1600x1200x32@75

combining these methods would allow the programmer to have all available modes and refresh rates. Maybe make two calls one to get the above list and then pass that into the IGL_ScreenSelector call. Then the programmer could make up his own list or edit the returned list and pass it in. This would give much more control to us.

' get the possible modes
Local modes:String[] = IGL_ScreenAvailModes()

' find out how many are not 800x600
Local totalValidModes:Int = 0
For Local weedout:String=EachIn modes
   If weedout.Find("800x600")=-1 then totalValidModes:+1
Next

' create mode list without 800x600
String[] myModes = new String[totalValidModes]
Local curMode:Int = 0
For weedout:String=EachIn modes
   If weedout.Find("800x600")=-1 then 
      myModes[curMode]=weedout
      curMode:+1
    EndIf 
Next

' put up the selector
IGL_ScreenSelector("Select Mode",myModes,false) ' false means don't set the mode yet

' find out what they selected
String selectedMode = IGL_GetCurrentScreenMode()

' set the mode
IGL_SetCurrentScreenMode(selectedMode)


or even better provide a function to weed out the modes as well

' get the possible modes
String[] modes = IGL_ScreenAvailModes()

'IGL_WeedScreenModes:String[](modes:String[],width:Int=-1,height:Int=-1,depth:Int=-1,rate:Int=-1)
' weeds out modes based on the parameters that aren't -1
String[] myModes = IGL_WeedScreenModes(modes,800,600)

' put up the selector
IGL_ScreenSelector("Select Mode",myModes,false) ' false means don't set the mode yet

' find out what they selected
String selectedMode = IGL_GetCurrentScreenMode()

' set the mode
IGL_SetCurrentScreenMode(selectedMode)



Filax(Posted 2005) [#90]
It's a good idea ! :) i take note :)

I have made this screen selector for easy example but of course you
can design your hown ! but i plan some stuff for IGlass screen selector.

Cheers


SillyPutty(Posted 2005) [#91]
filax, first off, AWSOME work, i love this !

however, when i try and launch a file open dialog box, or a message box, my application hangs.


Filax(Posted 2005) [#92]
hangs ? what this term ? bug ?

Try to look how is coded the fileselector example under iglass .


Scott Shaver(Posted 2005) [#93]
Here is a set of replacement commands for the video mode selector in iGlass, this give you more control.

'---------------------------------------------------------------
' replacement commands for the iGlass video mode requestor
'
' by Scott Shaver June 10, 2005
'---------------------------------------------------------------

Strict

' ------------------------
' the selected screen mode values
' ------------------------
Global SelectedWidth:Int=-1
Global SelectedHeight:Int=-1
Global SelectedDepth:Int=-1
Global SelectedFreq:Int=-1
Global SelectedScreenMode:String=Null

'---------------------------------------------------------------
'---------------------------------------------------------------
'---------------------------------------------------------------
'---------------------------------------------------------------
'START - THIS AREA SHOW AN EXAMPLE OF HOW TO USE THE FUNCTIONS
' remove this example code when you write your program
'---------------------------------------------------------------
'---------------------------------------------------------------
'---------------------------------------------------------------
'---------------------------------------------------------------


' --------------------------
' Load IGL gui ! important !
' --------------------------
Include "IGlass Release/IGL_Classe/Inc_IGlass.bmx"

Local modes:String[] = IGL_GetAvailScreenModes() ' get the possible modes
modes = IGL_WeedScreenModes(modes,1600,1200) ' don't these modes
Local action:Int = IGL_ScreenModeSelector("Select A Video Mode","",modes,0) ' let user select
If action<>3 Then ' user didn't cancel
	DebugLog "User Selected: " + SelectedScreenMode
	DebugLog SelectedWidth+"x"+SelectedHeight+"x"+SelectedDepth+"@"+SelectedFreq
	IGL_SetCurrentScreenMode(SelectedScreenMode)
	IGL_InitGUI(1)
	IGL_Background("IGlass Release/IGL_Demos/Background_01.png")

	While Not KeyHit(KEY_ESCAPE)
		Cls
		IGL_RefreshGui()
		
		SetColor 255,255,255
		DrawText "FPS : "+IGL_Fps,10,10
	
		bglSwapBuffers()
		FlushMem()
	Wend 
	IGL_ClearGui()
Else
	DebugLog "User Selected: Cancel"
EndIf
End

'---------------------------------------------------------------
'---------------------------------------------------------------
'---------------------------------------------------------------
'---------------------------------------------------------------
'END - THIS AREA SHOW AN EXAMPLE OF HOW TO USE THE FUNCTIONS
'---------------------------------------------------------------
'---------------------------------------------------------------
'---------------------------------------------------------------
'---------------------------------------------------------------


' ----------------------
' Get the list of available video modes
' ----------------------
Function IGL_GetAvailScreenModes:String[]()

	' ----------------------
	' width and height mode array
	' ----------------------
	Local sizeCount:Int = 5
	Local widthHeight:Int[sizeCount,2]
	widthHeight[0,0]=640
	widthHeight[0,1]=480
	widthHeight[1,0]=800
	widthHeight[1,1]=600
	widthHeight[2,0]=1024
	widthHeight[2,1]=768
	widthHeight[3,0]=1280
	widthHeight[3,1]=1024
	widthHeight[4,0]=1600
	widthHeight[4,1]=1200

	' ----------------------
	' bit depth mode array
	' ----------------------
	Local depthCount:Int = 3
	Local bitDepth:Int[depthCount]
	bitDepth[0]=16
	bitDepth[1]=24
	bitDepth[2]=32

	' ----------------------
	' refresh rate mode array
	' ----------------------
	Local rateCount:Int = 9
	Local refreshRate:Int[rateCount]
	refreshRate[0]=50
	refreshRate[1]=60
	refreshRate[2]=70
	refreshRate[3]=72
	refreshRate[4]=75
	refreshRate[5]=80
	refreshRate[6]=85
	refreshRate[7]=100
	refreshRate[8]=120

	' ----------------------
	' Create the list of avaiable modes
	' ----------------------
	Local modes:String[] = New String[sizeCount*depthCount*rateCount]
	Local modeCount:Int = 0
	For Local size:Int = 0 Until sizeCount
		For Local depth:Int = 0 Until depthCount
			For Local rate:Int = 0 Until rateCount
				If GraphicsModeExists(widthHeight[size,0],widthHeight[size,1],bitDepth[depth],refreshRate[rate]) Then 
					modes[modeCount] = widthHeight[size,0] + "x" +  widthHeight[size,1] + "x" + bitDepth[depth] + "@" + refreshRate[rate]
					modeCount:+1
				EndIf
			Next
		Next
	Next

	' ----------------------
	' don't return empty mode elements
	' ----------------------
	Local retModes:String[] = New String[modeCount]
	For Local x:Int = 0 Until modeCount
		If modes[x]<>Null And modes[x].length<>0 Then
			retModes[x] = modes[x]
		EndIf
	Next
	Return retModes
End Function

' ----------------------
' remove any undesired modes from the supplied mode list.
' any parameters that are not -1 are used to weed out the modes
' ----------------------
Function IGL_WeedScreenModes:String[](modes:String[],width:Int=-1,height:Int=-1,depth:Int=-1,rate:Int=-1)
	' ----------------------
	' find out how many should remain after weeding
	' ----------------------
	Local totalValidModes:Int = 0
	For Local weedout:String=EachIn modes
	   If weedout<>Null And weedout.length<>0 And weedout.Find(""+width+"x")=-1 And weedout.Find("x"+height+"x")=-1 And weedout.Find("x"+depth+"x")=-1 And weedout.Find("@"+rate)=-1 Then totalValidModes:+1
	Next

	' ----------------------
	' create a new list without the weeded modes
	' ----------------------
	Local myModes:String[] = New String[totalValidModes]
	Local curMode:Int = 0
	For Local weedout:String=EachIn modes
	   If weedout<>Null And weedout.length<>0 And weedout.Find("x"+width)=-1 And weedout.Find("x"+height+"x")=-1 And weedout.Find("x"+depth+"x")=-1 And weedout.Find("@"+rate)=-1 Then
    	  myModes[curMode]=weedout
	      curMode:+1
    	EndIf 
	Next

	Return myModes
End Function

' ----------------------
' Print the mode list to debug
' ----------------------
Function IGL_PrintScreenModes(modes:String[])
	For Local s:String=EachIn modes
		DebugLog s
	Next
End Function

' ----------------------
' Create screen selector
' ----------------------
Function IGL_ScreenModeSelector(Title:String,Background:String="",modes:String[],initMode:Byte=1)
	' ------------
	' Open graphic
	' ------------
	Graphics 640,480,32

	' ------------------
	' Deactivate synchro
	' ------------------
	bglSetSwapInterval(0) 

	' --------------------------
	' Init IGL gui ! important !
	' --------------------------
	IGL_InitGUI(1)

	If Background<>"" Then
		IGL_Background(Background)
	EndIf

	' ---------------------
	' Define local variable
	' ---------------------
	Local Request_Window_Tx:Int=280	
	Local Request_Window_Ty:Int=300
	
	Local Request_Window_Px:Int=(GraphicsWidth()/2)-(Request_Window_Tx/2)
	Local Request_Window_Py:Int=(GraphicsHeight()/2)-(Request_Window_Ty/2)
	
	Local Request_Win:IGL_Window

	Local Request_ResList:IGL_ListBox
		
	Local Request_Button_Validate:IGL_PushButton
	Local Request_Button_Cancel:IGL_PushButton

	Local Request_ReturnMessage:Byte=False	

	' --------------------------
	' Build the requester window
	' --------------------------
	Request_Win=IGL_Window.Create(Title,Request_Window_Px,Request_Window_Py,Request_Window_Tx,Request_Window_Ty,False,True,False) 
	
	Request_Button_Validate=IGL_PushButton.Create(Request_Win,"Open",10,Request_Window_Ty-55,100)	
	Request_Button_Validate.ToolTip="Confirm your choice ..."
	
	Request_Button_Cancel=IGL_PushButton.Create(Request_Win,"Cancel",Request_Window_Tx-110,Request_Window_Ty-55,100)	
	Request_Button_Cancel.ToolTip="Close the window ..."

 	Request_ResList=IGL_ListBox.Create(Request_Win,10,10,Request_Window_Tx-20,10)

	For Local mode:String=EachIn modes
			Request_ResList.CreateITem(mode,IGL_Icon_Screen)
	Next
						
	' ---------------------------
	' Block the window swap event
	' ---------------------------
	IGL_WindowCanSwap=False 
	Request_Win.ActivateWindow()
	
	' ---------
	' Main Loop
	' ---------
	While Request_ReturnMessage=0
		Cls

		IGL_RefreshGui()
		
		' ---------------------
		' Test requester button
		' ---------------------
		If Request_Button_Validate<>Null Then		
			If Request_Button_Validate.ClickGadget()  Then
				Request_ReturnMessage=2
			EndIf
		EndIf

		If Request_Button_Cancel<>Null Then		
			If Request_Button_Cancel.ClickGadget() Then
				SelectedWidth=-1
				SelectedHeight=-1
				SelectedDepth=-1
				SelectedFreq=-1
				SelectedScreenMode=Null

				Request_ReturnMessage=3
			EndIf
		EndIf
		
		bglSwapBuffers()
		FlushMem()
	Wend
	
	' ------------------------
	' parse the selected screen mode
	' ------------------------
	Local selMode:String=Request_ResList.SelectedItem
	If Request_ReturnMessage<>3 Then ' user picked a mode
		Local tempVal:String = Null
		Local lastIndex:Int=0
		Local index:Int=0
		index = selMode.Find("x",lastIndex)
		If index<>-1 Then 
			tempVal=selMode[lastIndex..index] 
			SelectedWidth=tempVal.ToInt()
			lastIndex=index+1
		EndIf
		index = selMode.Find("x",lastIndex)
		If index<>-1 Then 
			tempVal=selMode[lastIndex..index] 
			SelectedHeight=tempVal.ToInt()
			lastIndex=index+1
		EndIf
		index = selMode.Find("@",lastIndex)
		If index<>-1 Then 
			tempVal=selMode[lastIndex..index] 
			SelectedDepth=tempVal.ToInt()
			lastIndex=index+1
		EndIf
		tempVal=selMode[lastIndex..selMode.length] 
		SelectedFreq=tempVal.ToInt()
		SelectedScreenMode=selMode
	EndIf
	
	' ------------------------------------------------
	' Close the window (and gadget) and return message
	' ------------------------------------------------	
	IGL_WindowCanSwap=True
	
	IGL_ClearGui()
	
	EndGraphics()
	
	' start the new mode only if they selected one and didn't cancel
	If initMode<>0 And Request_ReturnMessage<>3 Then
		Graphics SelectedWidth,SelectedHeight,SelectedDepth,SelectedFreq
	EndIf

	Return Request_ReturnMessage
End Function

' ----------------------
' Enter the specified graphics mode
' ----------------------
Function IGL_SetCurrentScreenMode(selMode:String)
	
	Local tempVal:String = Null
	Local lastIndex:Int=0
	Local index:Int=0
	index = selMode.Find("x",lastIndex)
	If index<>-1 Then 
		tempVal=selMode[lastIndex..index] 
		SelectedWidth=tempVal.ToInt()
		lastIndex=index+1
	EndIf
	index = selMode.Find("x",lastIndex)
	If index<>-1 Then 
		tempVal=selMode[lastIndex..index] 
		SelectedHeight=tempVal.ToInt()
		lastIndex=index+1
	EndIf
	index = selMode.Find("@",lastIndex)
	If index<>-1 Then 
		tempVal=selMode[lastIndex..index] 
		SelectedDepth=tempVal.ToInt()
		lastIndex=index+1
	EndIf
	tempVal=selMode[lastIndex..selMode.length] 
	SelectedFreq=tempVal.ToInt()
	SelectedScreenMode=selMode

	Graphics SelectedWidth,SelectedHeight,SelectedDepth,SelectedFreq
	
End Function


made a bug fix to above code int he IGL_WeedScreenModes function, you may need to grab it again. 6/10/2005 1:55pm MDT


SillyPutty(Posted 2005) [#94]
the app crahses, well not crashes, but hangs, that is suspends, it just sits there.

I cant seem to get this to work.

Anyone else have this problem ?

Anything that spawns a new window ? like message box or open file dialog.


Filax(Posted 2005) [#95]
It's very strange i have not this problem ??? can you post me an example to blitz3d.fr@...


SillyPutty(Posted 2005) [#96]
i am using your message box example.

Also, filax i see that the text on the windows are not aligned properly ?


Filax(Posted 2005) [#97]
Can you post a screenshot ?


SillyPutty(Posted 2005) [#98]
err, I will do so.

The titles are horizantally aligned too high on windows and buttons. Just give me some time to take screenies. I dont have much time on the internet on weekends.

Also, do you understand my question about message boxes halting a program ?


SillyPutty(Posted 2005) [#99]
good news filax, the new update you sent me fixed all the problems :)

thanks so much, your speedy service and awsome program holds you in high regard in my books !


Scott Shaver(Posted 2005) [#100]
Would you please explain to me how to make this thing work on Mac OS X. I tried with 1.09 and 1.10 with all modules sync'd. It simply refuses to link.

mod/pub.mod/igl.mod/igl.release.macos.a is out of date; rerun ranlib(1) (can't load from it)

I'm getting really fed up screwing around with this, I paid for it it should work.

This is using the new mac 1.5.1 version you sent out this weekend. I tried the old version as well and it doesn't work either.


Filax(Posted 2005) [#101]
do you receive the 1.5.1 release ?


Scott Shaver(Posted 2005) [#102]
This is using the new mac 1.5.1 version you sent out this weekend. I tried the old version as well and it doesn't work either.


Filax(Posted 2005) [#103]
I can't explain this problem ??? what excatly not working ?
compilation ? executing ?

Can you make a new install of blitzmax for be sure ?


Scott Shaver(Posted 2005) [#104]
linking

mod/pub.mod/igl.mod/igl.release.macos.a is out of date; rerun ranlib(1) (can't load from it)


It won't even link the example programs


Perturbatio(Posted 2005) [#105]
bmk has a ranlibdir option if that's of any use.


Filax(Posted 2005) [#106]
And the linking work with IGlass example or this code (see top) ?


Scott Shaver(Posted 2005) [#107]
This is the error during the link phase of all iGlass examples

ld: table of contents for archive: /Applications/BlitzMax1.10/mod/pub.mod/igl.mod/igl.release.macos.a is out of date; rerun ranlib(1) (can't load from it)


This is a brand new install of 1.09 upgraded to 1.10 and then mods where sync'd. Removed old iGlass and put the 1.5.1 version in the pub.mod directory.


marksibly(Posted 2005) [#108]
Hi,


mod/pub.mod/igl.mod/igl.release.macos.a is out of date; rerun ranlib(1) (can't load from it)



For reasons I don't understand, MacOS has problems with copying '.a' files.

Try (from the command line):

bmk ranlibdir /Applications/BlitzMax/mod


Filax(Posted 2005) [#109]
Stupid mac sometime ...


Scott Shaver(Posted 2005) [#110]
Thanks Mark that fixed the problem. I was really getting upset, I've been fighting this thing all day. Sorry Filax.


Filax(Posted 2005) [#111]
No problem :) i love tracking "Xfiles" bugs :)


Filax(Posted 2005) [#112]
skn3[ac] : Clipboard read and write is included now :)


Arowx(Posted 2005) [#113]
Hi, I've got my copy of IGlass now and I'm just starting to play with it.

I noticed an odditie not sure if it's IGlass or BlitzMax related?

In effect I'm building a tile map as a background and, although I could overlay the GUI I couldn't seem to get the tiled background to appear...

However when I ....

Render Loop
Cls
SetColor(White) 'This allows the backgound to display
Draw Background
IGL_RefreshGUI()
End Render Loop

... Added a SetColor element the tiles appeared!

Not sure if it's a bug or a feature ;o)!

IGlass is cool!


Grisu(Posted 2005) [#114]
edit the IGL_RefreshGUI() function and unmark:

' ----------------------------------
' Redraw background image if present
' ----------------------------------
If IGL_BackgroundImage<>False Then
IGL_DrawImage(IGL_BackgroundImage,0,0,IGL_WhiteColor)
EndIf

these lines, so the gui does not overwrite your background.


Filax(Posted 2005) [#115]
or more simple :)

' --------------------------
' Init IGL gui ! important !
' --------------------------
IGL_InitGUI(1)

IGL_InitBackground("./IGL_Demos/Background_02.png")

comment the line
IGL_InitBackground("./IGL_Demos/Background_02.png")

Because this line is only used when you want a background :)

Cheers


Isaac P(Posted 2005) [#116]
Any chance of non molebox'd demos?


Grisu(Posted 2005) [#117]
hmm? the media is simply incbined.

-----------

Btw Filax, can you make a functiom that returns the current selected "number" of an item seleced in a combo box and not its "text"?


Isaac P(Posted 2005) [#118]
I dont have windows installed atm and its impossible to cedega a moleboxed app because it spaz's out, thinks im trying to crack it heh.

I have no interest in the media


Filax(Posted 2005) [#119]
Grisu : Ok !

Marc White : ?? I don't understand ? the moleboxed exe crash ?


Isaac P(Posted 2005) [#120]
Filax, I am using Linux atm, My windows CD is borked and im awaiting a replacement to come through.

There is emulation software for linux called Cedega that runs windows games. However because your .exe's are moleboxed, when cedega tries to run them, molebox thinks the .exe has been compromised and refuses to run.

I don't expect you to build a special non molebox'd demo's for my situation.

Is there any chance that Iglass runs on linux too?


Filax(Posted 2005) [#121]
Hi marc :)

The problem for me is the linux installation ! it's the hell to install linux
simply ! lol

But if you you can advise me about a 'simple linux install"
I would make a linux version,i think


OrcEpic(Posted 2005) [#122]
Nice Gui Filax !

I used the BCF3 for Blitz3d and
I will use Iglass for Bmax.
Filax always gave a support of quality for its products


Isaac P(Posted 2005) [#123]
Simple linux installation.

Mhmm:

Simply mepis couldnt be easier to install, and works pretty much out the box on any hardware.

www.mepis.org


If you need any help, just gimme a shout and I'll you the best I can.


Filax(Posted 2005) [#124]
:) many thanks :) I try to make my possible:)


SillyPutty(Posted 2005) [#125]
i have never had a support issue, i think your gui is superb.


Filax(Posted 2005) [#126]
Thanks :)


bruZard(Posted 2005) [#127]
IGlass needs the MSVCR71.dll? I get this error with WinXP (no ServicePack) and a Radeon9600, PIV 2,4GHz and 1024MB Ram (DDR 333).

Here's a (german) Error-Message:



-:excuse my ******* english :- ;)


Filax(Posted 2005) [#128]
??? lol absolutly not :) i use only one or two WIN32 functions
but nothing with MSVCRT ! maybe you have installed a 3D module ?
or other who need this ?

Be carefull if you have installed irlicht 3D engine ! if you don't make
framework, irlicht is integrated automaticly under your blitzmax app !
you must distribute the DLL with your app !

Or maybe a blitzmax exe bug ? i don't know !


amonite(Posted 2005) [#129]
yeah bruZard, works fine for me without the need of MSVCR7.dll at all :)


bruZard(Posted 2005) [#130]
ok, i've installed SP2 and now: it works ... i think you should add this information to the system requirements ...

at first: i dont have installed any third party module
at second: this error came with the compiled demos :)

"Windows XP - Service Pack 2"

do'nt cry, i will add it to _my_ reqiurements in my docs ;)

-:excuse my ******* english :- ;)


Filax(Posted 2005) [#131]
Maybe moleboxed exe ???!!! because i have packed my exe with
molebox


Arowx(Posted 2005) [#132]
Hi Filax,

I'm trying to write a nice little tile editor and wanted a floating window with a scrollbar as a floating pallet. However all of the image features seem to be aimed at file or IncBin based simple images.

However the simplest way to store the textures is from LoadAnimImage and use the index parameter provided by blitzmax! Would it be possible to use an Anim image array as well as a single image?

Regards

Merx


Filax(Posted 2005) [#133]
Its a very good idea to use a simple image for make toolbar !
i will look this ! but for the moment IGlass use only single frame
picture but i plan a new animated button class :) but, shuuttt !
it's a secret :)


ziggy(Posted 2005) [#134]
Hey Filax, great GUI. If you're looking for an easy and stablem Linux distro, I suggest you to install Red Hat Fedora 3. It's very very stable and the installation utility is very non-linux user friendly. It installs ok as a secondary OS if you've got windows installed previously. You can download it at http://fedora.redhat.com/
Hope you find this information useful.
Congratulations for your GUI


Filax(Posted 2005) [#135]
Many thanks ! ziggy


Filax(Posted 2005) [#136]
Linux is hell !!! :(

But :) i have compiled the Iglass module for linux :) dear customer's
please check your mail :)

Can you send me bug report for this version ? because i have test
linux with vmware, i have not big FPS ... (0 for information :) ) but
the module compilation don't report error :)




N(Posted 2005) [#137]
Do you get the source with IGlass?


Filax(Posted 2005) [#138]
No for the moment i release only the module. Use the mac version
under linux because bmax linux seem to have the same problem.

But linux is not very easy to use for me... i hait typing 'klingon'
under console ..


Grisu(Posted 2005) [#139]
No E-Mail yet.

Btw when do we get the windows release with the error fixes?


Filax(Posted 2005) [#140]
Are you sure ? i have send this email to all customer !
i'll retry to send you .


Grisu(Posted 2005) [#141]
i have Mac and Win32 1.51 + your win32 tiny fixes pack.
But Linux is not so important for me atm I only use win32.
So any update there is welcome! :)


Filax(Posted 2005) [#142]
Do you receive well ? i have this adress :
s.sarbok@...

It is good ?


SillyPutty(Posted 2005) [#143]
filax, can you please help me ?

How can I incbin the assets ? I dont want people to mess with my skins and buttons. I want everything in the exe.


Filax(Posted 2005) [#144]
What ?


SillyPutty(Posted 2005) [#145]
How do I release my app which uses IGLass, but prevent users from accessing my gui graphics. I tried Incbin but could not get it to work.


Grisu(Posted 2005) [#146]
filax, its "only" a freemail address, but it should do.

deux, for inc bin.

Make sure that the paths+names set are "case sensitive" and use "/" inestead of "/"!

Include media like this:
Incbin "Data/panel_loading.png"

Load media like this:
Panel_Load =LoadImage("incbin::Data/panel_loading.png", Maskedimage)

Try using debugmode to check for errors, also your exe file should become larger when you incbin stuff!

P.S.: How about a "fresh" thread?!?


SillyPutty(Posted 2005) [#147]
ah sweet, thanks bro !!


SillyPutty(Posted 2005) [#148]
I still cant get it to work

incbin "IGL_Demos/Background_04.png"
IGL_InitBackground("incbin::IGL_Demos/Background_04.png")


SillyPutty(Posted 2005) [#149]
I got it, you mean \ instead of / ;)


Filax(Posted 2005) [#150]
Aah ok ! lol sorry :)


SillyPutty(Posted 2005) [#151]
npo man :)