GuruGUI - Free GUI-Mod for BlitzMax

BlitzMax Forums/BlitzMax Programming/GuruGUI - Free GUI-Mod for BlitzMax

maverick69(Posted 2005) [#1]
To develop the tools for our games I had written a gui mod for blitzmax.

I don't have documentation yet, and there probably also bugs in it and features that are not already implemented.

But I want to show the mod to you, and if people are interessted in it I will continue development on it and write a doucmentation. Probably other will also help me in improving it - then please contact me.

This mod is and will always be free and public domain, so everyone of you can use it.

Questions, Feedback, Bug Reports and so on is always welcome.

Download it on my webspace at:

www.webart-design.de/gurugui.zip

You have to copy the folder imw.mod in your mod directory and rebuild the modules (only tested with win32, don't know if this will work on linux/mac os).

The folder samples contains a little demo application you can start with. However, it doesn't show all features of the lib. Also included is a default skin.

Here is a screenshot from our Map Editor developed completly with this lib:

www.webart-design.de/mapeditor.jpg

Already implemented features are:

- Windows
- Buttons
- Checkboxes
- DropDown-Buttons
- Input/Editable Fields
- PopUp/PullDown Menus
- Requesters (Guru Meditations, similar to the old Amiga messages)
- Scrollbars
- Skins


ckob(Posted 2005) [#2]
got an error trying to build the module so I couldnt test it


maverick69(Posted 2005) [#3]
Can you describe the error? Did you tried to build it on win, linux or mac?

please try it from the command shell by change the directory into the blitzmax\bin directory and then typing

bmk makemods -d imw.gurugui
bmk makemods -r imw.gurugui



ckob(Posted 2005) [#4]
well it built the module or atleast didnt give me an error this time. But when I try to run the demo it says

"Can't Find Interface for module imw.gurugui"


Kev(Posted 2005) [#5]
hi maverick69

the gui is looking good i like the feel, i tryed it here on window's.

kev


maverick69(Posted 2005) [#6]
@ckob:

Hmmm... I think the error means that the module wasn't build correctly. I have build it for you for windows plattform and included it in the zip.

You can re-download it at http://www.webart-design.de/gurugui.zip and copy the imw.mod folder again.

Hopefully the demo will run then.

@Kev: Thank you, the feel is similar to the Workbench from Amiga OS :-), but of course using the skin-support it should also be possible to create a mac-os-like feel.


ckob(Posted 2005) [#7]
maverick69: thanks I figured it out I was putting the folder into the pub.mod directory instead of putting it in the mod directory sorry ;P

Anyway the look and feel is awesome I like how clean it looks keep up the good work.


Kev(Posted 2005) [#8]
maverick69

One thing i notice is should 'gurugui.mod' be in mod/pub then in gurugui.bmx the line 'Module imw.gurugui' be changed to 'Module PUB.gurugui' and in the example where 'Framework imw.GuruGui' changed to 'Framework PUB.GuruGui'

this is how i got it to work. or is it that the entire folder needs copying to blitzmax/mod

does this make sence?

*EDIT ckob, same thinking here. i normaly put them into mod/pub.

kev


maverick69(Posted 2005) [#9]
yes, you should put it directly into the Blitzmax\Mod folder, so the path will be something like "c:\program files\blitzmax\mod\imw.mod\gurugui.mod".

I'm also new to this whole module-stuff in BlitzMax, so probably i'm wrong but someone on this board mentioned to create an own folder for your own mods and so I did it that way. (please view: http://www.blitzmax.com/Community/posts.php?topic=42290 )

I really don't know which way makes more sense.


bruZard(Posted 2005) [#10]
Yeah ... AmigaOS4 Style ... i like it :)


Booticus(Posted 2005) [#11]
Sweeet!! And the scrollbar stays locked even when you stray from the actual scrollbar! Nice!


maverick69(Posted 2005) [#12]
thank you for the nice comments.

i have written a little demo to show the menu functions and dropdown-buttons to you, so you can play around with it a little bit more...

here is the code:

Strict

Framework IMW.GuruGui
Import BRL.JPGLoader
Import BRL.glMax2D

AppTitle = "Demo App (Menu) - please press right mouse button"
SetGraphicsDriver (GLMax2DDriver())

Graphics 800,600,0

'
' Set the Default skin
'

LoadSkin("skin")

SetSmallFont("skin/fonts/arial.ttf",10)
SetStdFont("skin/fonts/arial.ttf",12)
SetGuruFont("skin/fonts/VTSR____.TTF",16)
SetBackgroundPicture("skin/screen/bg.png")

'
' To create a window you have to deliever a
' class from TG_WND
'

Type TNewWindow Extends TG_WND

	' Add a drop down button to the window
	Field DropDownButton:TG_DropDown
	
	Method New()
	
		H = 120
	
		DropDownButton= New TG_DropDown
		DropDownButton.x = 10
		DropDownButton.y = 60
		DropDownButton.w = 125
		DropDownButton.Caption = "Click here..."
		AddChild(DropDownButton)
	End Method
	
	Method RenderContent()
		SetColor 255,0,0
		DrawText "I have no idea what I should",10,10
		DrawText "render here...",10,30
	End Method
End Type

'
' Now you can create an object from your
' delievered class
'

Global MyWindow:TNewWindow = New TNewWindow
MyWindow.Caption = "An empty window"

'
' Okay, let's craete a menu object
'

Global Menu:TG_Menu[3]

Menu[0] = New TG_Menu
Menu[1] = New TG_Menu
Menu[2] = New TG_Menu

' Add some Menu Items to main Menu

Menu[0].AddItem("File",Menu[1])
Menu[0].AddItem("Windows",Menu[2])
Menu[0].AddItem("Another Item")
Menu[0].AddItem("")
Menu[0].AddItem("Quit")

' Add some Menu items to sub menu's

Menu[1].AddItem("New...")
Menu[1].AddItem("Open...")
Menu[1].AddItem("Close...")

Menu[2].AddItem("Window 1")
Menu[2].AddItem("Window 2")
Menu[2].AddItem("Window 3")
Menu[2].AddItem("Window 4")
Menu[2].AddItem("Window 5")
Menu[2].AddItem("Window 6")

' Set some menu items inactive

Menu[2].SetItemInactive("Window 2")	
Menu[2].SetItemInactive("Window 5")	
Menu[2].SetItemInactive("Window 6")	
	
' Set some icons for menu items

Menu[0].LoadIcon("Another Item","skin/menu/checkmark.png")

Local CheckMenu:Byte = True

While Not KeyDown(KEY_ESCAPE)

	Cls
	
	Mouse.Refresh()
	Skin.DrawBackground()
	
	GraphicReset()
	TG_Wnd.RenderAllWindows()
	
		
	Skin.Refresh()

	' Pop up Menu when user presses right mouse button on desktop...
	If Mouse.Hit(2) And TG_TopObject[1-CurrentTopObject] = Null Then Menu[0].TrackPopUpMenu(MouseX() - 20,MouseY() - 5)
	If Menu[0].IsSelected("Quit") Then End
	If Menu[0].IsSelected("Another Item") Then Menu[0].HideIcon("Another Item", CheckMenu) ; CheckMenu = Not CheckMenu

	' Popup Menu when user presse button
	If MyWindow.DropDownButton.IsHit Then Menu[1].TrackPopUpMenu(MyWindow.DropDownButton.X + MyWindow.DropDownButton.OffsetX,MyWindow.DropDownButton.Y + MyWindow.DropDownButton.OffsetY + MyWindow.DropDownButton.H)

	Menu[0].Refresh()
	Menu[1].Refresh()


	FlushMem()
	Flip	
	
Wend

End



maverick69(Posted 2007) [#13]
Sorry for reactivating this old post, but does someone of you still have GuruGUI on your harddisk and can send it to me. I've lost it and would need it to compile a very old tool from me :(


popcade(Posted 2007) [#14]
http://icworx.org/_ext/gurugui.zip

It's the only version I kept, don't know if it helps.


maverick69(Posted 2007) [#15]
thanks!


Rene Albrecht(Posted 2007) [#16]
Download is forbidden :-(