IfsoGUI is very nice and I am looking for skins.

BlitzMax Forums/MaxGUI Module/IfsoGUI is very nice and I am looking for skins.

Takis76(Posted 2012) [#1]
Hello my friends again.

Today I purchase ifsoGUI and I am happy everything compiled and I start playing.
I would like to ask , is there any ready skin or if someone sells any skin or how do I create some.

The ifsoGUI , is shipped with only 2 skins and there are not fancy.

Where do I find some graphics or is there any ifsoGUI skin ready , or how to tranfer iGlass skins to ifsoGUI or is there any member here sell his/her skins?

iGlass mod is dead , but I think I will purchase it only for its skins and I will try convert them for ifsoGUI.


GaryV(Posted 2012) [#2]
I have always been interested in ifsoGUI, but never bought it due to having to use Google Checkout. I would be very interested in hearing feedback on the product itself from an actual user.


Htbaa(Posted 2012) [#3]
On the ifsoGUI website there's a skins.zip file I believe which has a couple of examples. You could modify those. All it is really is a text file that has some coordinates and images.


Takis76(Posted 2012) [#4]
I am creating my first skin and goes well , when I finish it , I will post screenshot.
My first skin is the same size of the existing ones , I don't know yet how to make changes in dimensions.txt , but I will learn

I would like to ask , is it posible to disable focus rectangle from buttons and checkboxes?

Thank you :)


Htbaa(Posted 2012) [#5]
Look here to figure out how to change dimensions: http://wiki.ifsogui.com/index.php/Skins


Takis76(Posted 2012) [#6]
I don't have understand the dimensions very much.
I would like to ask , how to make some skin transparent for example
I tried to use 255,0,255 color as transparent in my skin
I used these commands

SetMaskColor(255,0,255)
SetBlend(MASKBLEND)

And the color appears.

Any idea?


matibee(Posted 2012) [#7]
The dimensions are just pixel sizes of 9 portions of the image:

+--+--+--+
| 1| 2| 3|
+--+--+--+
| 4| 5| 6|
+--+--+--+
| 7| 8| 9|
+--+--+--+


The four corners (pieces 1, 3, 7 & 9) are drawn at their defined sizes, the edges (pieces 2, 4, 6, & 8) and the centre (piece 5) are stretched to make up the desired gadget dimensions.

As for transparent controls, just make the gadget skin transparent.

I started a transparent skin: http://www.blitzbasic.com/Community/posts.php?topic=96047

more details can be found on the ifsoGUI forums (which, I suppose, is where this conversation should be really.)


Takis76(Posted 2012) [#8]
@matibee

The last post of the link you gave , the guy is not explains how make his skin transparent and the documentation of ifsoGUI is not so detailed.

But your instruction how the dimensions work help me a lots to understand how to create my skins , even not transparent yet.


I would like to ask , in dimension.txt there is a text like this
window,7,8,7,8,7,8,7,8,7,8,7,8,2,2,7,8,7,8

Could you write me with numbers 1 to 9 from your grid which of them represent in these commas?

If we assume the fist 2 numbers are the position 1 on your grid?

window,1w,1h,2w,2h,3w,3h,4w,4h,5w,5h,6w,6h,7w,7h,8w,8h,9w,9h

As I understand.
Hmm , I must create a skin creator program which will load one image and you will select the areas of your desired skin and it will create the dimension.txt for you , but for now I need to understand how is working and making everything manually :(

After playing a lot , I created this. Now is transparent.



Do you like it? :)

Edit:

I found how to make it transparent and the second attempt was much better.
I found and how to make the labels transparent and the window translucent.

Gimp the best program for graphics and alpha channel effects and Paint Shop Pro..

Last edited 2012


Takis76(Posted 2012) [#9]
I have almost finish my first skin , but one think I don't see is the Canvas Gadget.
Or how to put some image in some window.
I am not say the background image , I say some image in some panel or in some canvas gadget.

Last edited 2012


matibee(Posted 2012) [#10]
There may not be a canvas gadget in ifsoGUI. Ask on the ifso forums about deriving one from the base ifso gadget type, I'm sure it will be very simple to do.


Takis76(Posted 2012) [#11]
And other people asked for this , in ifsoGUI forums , but as I see , it needs to extend the code which is impossible for me for now.
TaskMaster , seems not to extend his module.


matibee(Posted 2012) [#12]
I've written custom gadgets before and I'll take a look later. The reason I mentioned starting a thread there is because there is more chance of Taskmaster seeing it (and it is the right place after all).


Takis76(Posted 2012) [#13]
I post in the ifsoGUI forums and I am waiting what they will say.
As I see and official ifsoGUI forums are very small and little deserted.
And TaskMaster doesn't seems to upgrade his module.

What kind of gadgets did you write?
I am interesting.


SystemError51(Posted 2012) [#14]
I bought the module a while ago. It's definitely awesome and does what it says on the tin.

However - it lacks some things like minimization or some form of task handling for open windows. I made attempts in implementing those, but no luck. It also does not seem to work when you're working entirely in OpenGL and not with Max2D drivers.

That is primarily the reason why I'm building my own UI right now (included in the Reason Engine which is going commercial once it's finished).

All things considered I'd still recommend the library to anyone who needs a pretty complete windowing system.

Here's a screenshot of what I had been able to achieve through customization (pretty old screenshot though, didn't even have 3D in the background)

// EDIT

I should mention that the theme customization was incomplete. I can upload it though, if you're interested.

Last edited 2012


TaskMaster(Posted 2012) [#15]
That skin looks great Takis76.

As for extending, yes I have not extended the module in quite a while. I have been very busy with work and have not had much time to play with BlitzMax. Three weeks ago I spent a week in California on a business trip and this past week I was in Australia for 8 days. I do post fixes for any bugs that are reported, as I want ifsoGUI to remain useful.

As you can imagine, all of this travel does not leave me with much time to spend with my wife and 2 daughters, so I have been putting everything else aside while at home.

I have done what I can to make adding functionality to ifsoGUI possible and easy. If I had time to play in BlitzMax, I would help you out, I really would. I enjoy programming in BlitzMax, and I also like the ifsoGUI system and like to extend it. A picture on the background of a panel would be very simple to do. If I had time I would whip it up for you.


TaskMaster(Posted 2012) [#16]
GaryV,

Send me an email or something (marcus@...) and we can discuss the use of Google Checkout. I would have contacted you in private, but I can't seem to find your email in your profile or any posts here at blitzmax.com.


Takis76(Posted 2012) [#17]
@SystemError51

I am interesting

@TaskMaster

Can you give me instructions how your mod is working to try to create my own canvas gadget.

I tried the backimage command and I put some imase on the panel , but you cant change the position x,y of the image on panels.

I tried to create one new method in the source code for panels.

Method Draw_Image(my_image:TImage,x:Int,y:Int)
		
     DrawImage(my_image,x,y,0)
			
End Method


And when I create some panel my new method appears , but the image is not appearing.

For example:


Global button_normal:TImage
button_normal=LoadImage ("button_normal.png",0)

Global panel:ifsoGUI_Panel
panel = ifsoGUI_Panel.Create(5, 55, 105, 40, "pnl")
panel.SetTip("Panel tip")
panel.Draw_Image(button_normal,10,10)
Main1.AddChild(panel)


The code compiled , but the image of the button is not appeared on the panel at position x=10 , y=10

My idea is to use the code of the panel to create the canvas gadget.
Or add draw_image method on the panels.

And after that , I am not able to drag any window.

If I delete my method and recompile , then I am able to drag my window.


Zeke(Posted 2012) [#18]
Add this to ifsogui_base type:
Field drawfunc:Int(x:Int,y:Int) 'Draw Callback
Field drawcallback_pos:Int
	
Method SetDrawCallback:Int(func:Int(parX:Int,parY:Int),call_pos:Int=0) 'call_pos=0 -> Call function before draw_child, 1 -> Call function after draw_child
	drawfunc=func
	drawcallback_pos=call_pos
End Method

then add this to ifsogui_panel type, Draw method:
'## Add this
Local ax:Int,ay:Int
GetAbsoluteXY(ax,ay)
If drawfunc And drawcallback_pos=0 Then
	drawfunc(ax,ay)
EndIf
'---
DrawChildren(rX + BorderLeft, rY + BorderTop, chkW, chkH) 'Search this line so you know where to insert code
'---
If drawfunc And drawcallback_pos=1 Then
	drawfunc(ax,ay)
EndIf
'### end ###

then build module.

this is how to use DrawCallback:
panel.SetDrawCallback(test, 1) 'Call AFTER Children

Function test:Int(x:Int, y:Int) 'x/y = panel left-top position
	SetColor 255, 0, 0
	DrawText "HELLO", x, y
	SetColor 0, 255, 0
	DrawLine x, y, x + 100, y + 100
End Function



Takis76(Posted 2012) [#19]
What this code will do?
As a part of code I don't understand , what Callback do?

Waht you mean saying ifsogui_base?

You mean in the nest of

Type ifsoGUI_Panel Extends ifsoGUI_Base

I put the first part of your code insode the type

just to the top.

The I added the second part in the draw method of the panel

in this method:

Method Draw(parX:Int, parY:Int, parW:Int, parH:Int)

I recompiled and rebuild whole module and I put the last part of the code in my program and I have

EXCEPTION_ACCESS_VIOLATION error.

What next?

I don't have understand the code well.

Any idea? what this code suppose to do? does it will draw in the panel?


Zeke(Posted 2012) [#20]
yes. this code will draw to panel, before or after child gadgets(labels,buttons..)

first code goes to gui.mod/basegadget.bmx-> Type ifsoGUI_Base Abstract (add just after fields)

and second part is right. panel.mod/panel.bmx-> Type ifsoGUI_Panel Extends ifsoGUI_Base -> Method Draw(parX:Int, parY:Int, parW:Int, parH:Int)

also make sure that 2nd code will go to the right place:

the last lines of Method Draw() will look like this:
	If HBar.Visible chkH:-ScrollBarWidth
	'## Add this
	Local ax:Int,ay:Int
	GetAbsoluteXY(ax,ay)
	If drawfunc And drawcallback_pos=0 Then
		drawfunc(ax,ay)
	EndIf
	'---
	DrawChildren(rX + BorderLeft, rY + BorderTop, chkW, chkH) 'This line already exists in original code
	'---
	If drawfunc And drawcallback_pos=1 Then
		drawfunc(ax,ay)
	EndIf
	'### end ###
	VBar.Draw(rX + BorderLeft, rY + BorderTop, w, h)
	HBar.Draw(rX + BorderLeft, rY + BorderTop, w, h)
End Method



Takis76(Posted 2012) [#21]
I tried to compile basegadget.bmx and I have this error:

Compile Error: Identifier 'ifsoGUI_Event' not found
Build Error: failed to compile C:/BlitzMax/mod/ifsogui.mod/gui.mod/basegadget.bmx

And the error goes to line 177

Local e:ifsoGUI_Event = New ifsoGUI_Event



I would like to ask , if I manage to compile this code above , am I able to put pictures on the panel in any position x or y?


Takis76(Posted 2012) [#22]
When I compile whole module from advenced module builder the module compiles.

But I put the last code:

Function test:Int(x:Int, y:Int) 'x/y = panel left-top position
	SetColor 255, 0, 0
	DrawText "HELLO", x, y
	SetColor 0, 255, 0
	DrawLine x, y, x + 100, y + 100
End Function

Global panel:ifsoGUI_Panel
panel = ifsoGUI_Panel.Create(5, 55, 105, 40, "pnl")
panel.SetTip("Panel tip")
panel.SetDrawCallback(test(10, 10), 1) 'Call AFTER Children
Main1.AddChild(panel)



Compile Error: Unable to convert from 'Int' to 'Int(Int,Int)'

Last edited 2012


Hotshot2005(Posted 2012) [#23]
I still have it and it is very good :)


Takis76(Posted 2012) [#24]
What you have?


Hotshot2005(Posted 2012) [#25]
ifsoGUI :)


Takis76(Posted 2012) [#26]
Yes is nice , but if it have some canvas gadget ready, it will be nicer.

Last edited 2012


Zeke(Posted 2012) [#27]
panel.SetDrawCallback(test(10, 10), 1) 'Call AFTER Children

to
panel.SetDrawCallback(test, 1) 'Call AFTER Children

because when gui draws a gadget and call our 'Callback function' (test), it will put panel Absolute X,y coords to function arguments.
in function x,y will tell you panel top-left position.
so Draw "Hello",x,y will draw text Hello to panel top-left corner.


I would like to ask , if I manage to compile this code above , am I able to put pictures on the panel in any position x or y?


yes. just remember that x,y are panel position on the screen.

We can easily modify that code using GetOrigin/SetOrigin, just before and after calling callback function. then we dont need x,y arguments and DrawText "Hello",0,0

Last edited 2012


Zeke(Posted 2012) [#28]
ok here is that modified code:

goes to ifsogui_base type:
Field drawfunc:Int() 'Draw Callback
Field drawcallback_pos:Int
	
Method SetDrawCallback:Int(func:Int(),call_pos:Int=0) 'call_pos=0 -> Call function before draw_child, 1 -> Call function after draw_child
	drawfunc=func
	drawcallback_pos=call_pos
End Method


to ifsoGUI_Panel type (Method Draw):
If HBar.Visible chkH:-ScrollBarWidth
'## Add this
Local ax:Int,ay:Int
GetAbsoluteXY(ax,ay)
If drawfunc And drawcallback_pos=0 Then
	Local ox:Float,oy:Float
	GetOrigin(ox,oy) 'Get current origin
	SetOrigin(ax,ay) 'Set Origin to panel top-left corner
	drawfunc() 'Call callback function
	SetOrigin(ox,oy) 'Set Origin to default
EndIf
'---
DrawChildren(rX + BorderLeft, rY + BorderTop, chkW, chkH)
'---
If drawfunc And drawcallback_pos=1 Then
	Local ox:Float,oy:Float
	GetOrigin(ox,oy) 'Get current origin
	SetOrigin(ax,ay) 'Set Origin to panel top-left corner
	drawfunc() 'Call callback function
	SetOrigin(ox,oy) 'Set Origin to default
EndIf
'### end ###
VBar.Draw(rX + BorderLeft, rY + BorderTop, w, h)
HBar.Draw(rX + BorderLeft, rY + BorderTop, w, h)
End Method


and example:
panel.SetDrawCallback(test, 1) 'Call AFTER Children

Function test:Int()
	SetColor 255, 0, 0
	DrawText "HELLO", 0, 0 'NOW 0,0 is Panel top-left position
	SetColor 0, 255, 0
	DrawLine 0, 0, 100, 100
End Function



Takis76(Posted 2012) [#29]
I put the code again.
Now compiled and when I run I have

EXCEPTION ACCESS VIOLATION

Error :P

As I see only the programmer (The creator one "TaskMaster") is able to do something with his creation.

Nevermind , I will wait for some future version sometime when he will not have much work and create some canvas gadget.

Thank you very much for your help.