FryGUI

BlitzMax Forums/BlitzMax Programming/FryGUI

Brucey(Posted 2008) [#1]
Okay, so I'm a bit late to the party... just been trying out FryGUI for the first time, and it's really not too bad at all !!

But you know me... I can't leave things well alone, and the first thing I missed was scroll-wheel functionality on the table (to begin with).

A little hack to Table.bmx to implement scroll-wheel scrolling...
... add a new field

	Field gOZ:Int

... and adding to the UpdateMouseOver() method...

		'deal with the scroll wheel
		Local z:Int = MouseZ()

		If z <> gOZ Then
			If z > gOZ Then
				gScroll.gPart = fry_TScrollBar.DEC_PART
			Else
				gScroll.gPart = fry_TScrollBar.INC_PART
			End If
		
			gOZ = z
			gScroll.UpdateMouseRelease(0,0)
		End If

... and to the Update() method, add this little bit

		If Not gState Then
			gOZ = MouseZ()
		End If


Possibly the call to UpdateMouseRelease() is a bit messy... but it works.

I'd much rather have an intermediate type called something along the lines of fry_TGadgetWithScrollBar which could better implement the mouse functionality - rather than will be the case at the moment of duplicating code...

But a very nice, reasonably fast, graphics-based GUI. Now I just need to work how to go about building UI's using the xml stuff..... argh...

:o)


Brucey(Posted 2008) [#2]
Nice design... Comboboxes are built from Tables... and now are scrolly wheel enabled too.


Okay.. for the last tweak this evening, here's scrollbar scrolling functionality :

In ScrollBar.bmx...
... add a new field

	Field gOZ:Int

... implement an Update() method

	Method Update(x:Int, y:Int)
	
		If Not gState Then
			gOZ = MouseZ()
		End If
		
		Super.Update(x, y)
		
	End Method


... and add some code to the UpdateMouseOver()

		Local z:Int = MouseZ()

		If z <> gOZ Then
			If z > gOZ Then
				gPart = fry_TScrollBar.DEC_PART
			Else
				gPart = fry_TScrollBar.INC_PART
			End If
		
			gOZ = z
			UpdateMouseRelease(0,0)
		End If



Anyhoo... back to other things ;-)


Brucey(Posted 2008) [#3]
Plash made a form designer too! :-)

How's it coming along, btw? Would be nice if I could resize the gadgets by dragging a corner, for example.


plash(Posted 2008) [#4]
Now thats a thought ;)

It's do-able, and since I'm remaking the newer version in wxmax its going to use a propgrid for all the gadget fields.
Another thing I was thinking of implementing was BriskVM scripts, so you can extend frygui to create new gadgets.. and possibly for wx event functions.

EDIT: BriskVM scripts would probably use some wx stuff though, so that would mean mapping the whole wxmax module into a bcs :/

It'd be nice if we could get the code for parsing BlitzMax code ( http://www.blitzbasic.com/logs/userlog.php?user=1021&log=1600 ) and turn it into a whole module -> bcs converter.


ziggy(Posted 2008) [#5]
@Plash: There's a BLIde plugin in development for this particular issue.
If somebody wants to give it a try, or develope it further (as I'm not having much time now), you can get the source code here. (Open the SDK file on BLIde, and press f5 to execute the plugin. BLIde should execute with the option Generate BCS file in the addons menu).
This plugin generates a bcs file from a single bmx file, but this can be easily improved. Also, the plugin gets ride of functions inside modules and create the non-module functions counterpart.

EDIT: BLIde 0.9.54 C or greater is requiered for this plugin to work.


plash(Posted 2008) [#6]
Error (ver 9.52a): 'FileName' is not a member of 'BLIde.SDK.Editor'.

P.S. using .sdk in the free edition, when an error occurs you can't get rid of the yellow'd line (where the error occurred).
AND I still can't copy text from an error box.


ziggy(Posted 2008) [#7]
@Plash: this SDK uses the extended API in the current BLIde beta. I'm sorry I should have mentioned this. Anyway, the next version will be out in a couple of days or so, I need to fix a stability issue before releasing it.


Hotshot2005(Posted 2010) [#8]
is this FryGUI out of date?


Volker(Posted 2010) [#9]
Take a look here:
http://www.blitzbasic.com/Community/posts.php?topic=65067