sGUI

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
Post Reply
petan
Posts: 683
Joined: Feb 16, 2010 15:34
Location: Europe
Contact:

Re: sGUI

Post by petan »

085 has the same 'pink polygon' behavior, if gadget is partially out of screen.It would be good to fix it, get/put commands replaced with function, or macro.
Solutions was posted many times, IIRC it's short, very close similar code
I'll try to solve it as in designer, just having opened too many things now...
Image
Last edited by petan on Jul 16, 2016 11:39, edited 1 time in total.
petan
Posts: 683
Joined: Feb 16, 2010 15:34
Location: Europe
Contact:

Re: sGUI

Post by petan »

... by patch from designer

Code: Select all

			
REM put fixed
REM 		'put (x1,y1),dizzyBck1,pset
			if x1<0 then
			 put (0,y1),dizzyBck1,pset
			else
			 put (x1,y1),dizzyBck1,pset			
			end if

REM get fixed
REM 		'get (x1,y1)-(x2,y2),dizzyBck1
			if x1<0 then
			 get (0,y1)-(x2,y2),dizzyBck1
			elseif x2>scrW-1 then
			 get (x1,y1)-(scrW-1,y2),dizzyBck1 
			else
			 get (x1,y1)-(x2,y2),dizzyBck1			
			end if			
			

to create a macros 'getM' + 'putM'
datwill310
Posts: 355
Joined: May 29, 2015 20:37

Re: sGUI

Post by datwill310 »

Muttonhead,

I think I will use this library for my new game I'm making! Great work!
Muttonhead
Posts: 140
Joined: May 28, 2009 20:07

Re: sGUI

Post by Muttonhead »

Nice to see a user :)
At the moment I do not have much time for the further development of the new version.
But if you are interested, you can take a look at the "current" development status:
http://www.muttonhead.homepage.t-online ... v0.8.6.zip
Mutton
datwill310
Posts: 355
Joined: May 29, 2015 20:37

Re: sGUI

Post by datwill310 »

Muttonhead wrote:Nice to see a user :)
At the moment I do not have much time for the further development of the new version.
But if you are interested, you can take a look at the "current" development status:
http://www.muttonhead.homepage.t-online ... v0.8.6.zip
Mutton
Like the new look! And looking through some of the demo programs, I am guessing Ubuntu has something to do with CUSTOM fonts? And popup menus too! Great work: I could never do something like this!
datwill310
Posts: 355
Joined: May 29, 2015 20:37

Re: sGUI

Post by datwill310 »

Hi,

Is there a way to retrieve the gadget pointer of the scroll bar of a list box? I am attempting to redraw a list box and I noticed its accompanying scroll bar did not redraw. Is there a way to redraw this part of the list box?
Muttonhead
Posts: 140
Joined: May 28, 2009 20:07

Re: sGUI

Post by Muttonhead »

oh it looks like a bug in sGUI_v0.8.56

open ListBox.bas in the sGUI folder
at row 90 you will find this:

Code: Select all

sub DrawList (gad as Gadget ptr)
  dim as Gadget ptr listbox
  listbox=gad->subevent->GadgetList->GetFirst
  DrawGadget(listbox)
end sub
change it to:

Code: Select all

sub DrawList (gad as Gadget ptr)
  dim as Gadget ptr listbox,scrollbar
  listbox=gad->subevent->GadgetList->GetFirst
  scrollbar=cast(Gadget ptr,listbox->next_node)
  DrawGadget(listbox)
  DrawGadget(scrollbar)
end sub
not tested !!

Mutton
datwill310
Posts: 355
Joined: May 29, 2015 20:37

Re: sGUI

Post by datwill310 »

Muttonhead wrote:oh it looks like a bug in sGUI_v0.8.56

open ListBox.bas in the sGUI folder
at row 90 you will find this:

...

change it to:

..

not tested !!

Mutton
Thanks for the fix; it works perfectly!
Roland Chastain
Posts: 1008
Joined: Nov 24, 2011 19:49
Location: France
Contact:

Re: sGUI

Post by Roland Chastain »

Muttonhead wrote:At the moment I do not have much time for the further development of the new version.
But if you are interested, you can take a look at the "current" development status:
http://www.muttonhead.homepage.t-online ... v0.8.6.zip
Hello! Beautiful work. I will try to use this version in my projects.
Kot
Posts: 336
Joined: Dec 28, 2006 10:34

Re: sGUI

Post by Kot »

The link to short pdf reference gives 404 error :(
Muttonhead
Posts: 140
Joined: May 28, 2009 20:07

Re: sGUI

Post by Muttonhead »

Kot wrote:The link to short pdf reference gives 404 error :(
fixed
Muttonhead
Posts: 140
Joined: May 28, 2009 20:07

Re: sGUI

Post by Muttonhead »

https://1drv.ms/u/s!AsTPhVzcfzRrh_I9h5SYXlLPJHzt5Q

...after a very long time... something new again. There will be a kind of window system in the successor. At the moment only this one exists. I'm amazed what you can do with a single thread.

Mutton
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: sGUI

Post by jj2007 »

Window_UserGFXDemo compiles and works "out of the box" - compliments! But please test the older demos, for example sGUI_Misc.bas.
dodicat
Posts: 7995
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: sGUI

Post by dodicat »

sGUI_Misc.bas has one residual suffix $ attached so it has to be removed for 1.06.
There are possibly others.
If you actually use -s gui as a compiler switch in 64 bits then the bug viz:
viewtopic.php?f=6&p=260105#p260105
applies(in Win 10 anyway).
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: sGUI

Post by jj2007 »

Even after correction of the two chr$(), I get a bunch of cryptic errors:

Code: Select all

** compiling TmpFb.bas with -t 2000 -s console **
sGUIWin_v0.9.00_01\tmp\TmpFb.bas(6) error 14: Expected identifier, found 'TextObject'
sGUIWin_v0.9.00_01\tmp\TmpFb.bas(7) error 41: Variable not declared, TOList
sGUIWin_v0.9.00_01\tmp\TmpFb.bas(8) warning 13(0): Function result was not explicitly set
sGUIWin_v0.9.00_01\tmp\TmpFb.bas(11) error 58: Illegal specification, at parameter 1 (t) of DelTextObject()
sGUIWin_v0.9.00_01\tmp\TmpFb.bas(12) error 3: Expected End-of-Line, found 'TOList'
sGUIWin_v0.9.00_01\tmp\TmpFb.bas(16) error 14: Expected identifier, found 'sGUIImage'
sGUIWin_v0.9.00_01\tmp\TmpFb.bas(17) error 41: Variable not declared, ImageList
sGUIWin_v0.9.00_01\tmp\TmpFb.bas(18) warning 13(0): Function result was not explicitly set
sGUIWin_v0.9.00_01\tmp\TmpFb.bas(22) error 58: Illegal specification, at parameter 1 (sguiimg) of DelImageEntry()
sGUIWin_v0.9.00_01\tmp\TmpFb.bas(23) error 3: Expected End-of-Line, found 'ImageList'
sGUIWin_v0.9.00_01\tmp\TmpFb.bas(27) error 14: Expected identifier, found 'Menu'
sGUIWin_v0.9.00_01\tmp\TmpFb.bas(28) error 41: Variable not declared, MenuList
sGUIWin_v0.9.00_01\tmp\TmpFb.bas(28) error 132: Too many errors, exiting
Post Reply