New ScuiLib version?

Discuss any general programming issues here
User avatar
Clyde
Posts: 120
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: New ScuiLib version?

Post by Clyde » Fri Sep 16, 2011 11:02 am

Yeah, this looks superb! Great!!!

One thing is missing: "And here is the code needed to make the fGUI in the first picture:" Where is it? :-) Would be nice to have it.

What do you mean by "floating tips"?

Do you have a small example for the layout system? Would be great!

Will the new version still be called "ScuiLib"? Or is it "HGui" now. :-)

BTW, did you receive my mail?

Thanks a lot for all your hard work!

@jalih: Although I think it is really cool if people create many different stuff, I think it would be better to join forces. IMHO it is not that useful to have "hundreds" of different GUI systems, e.g. (no offence!!!!!!) What about helping Allanon out with ScuiLib in order to release it earlier etc.? Of course this is depending on Allanon, if he is willing to do that. I already wrote him a mail which refers a bit to this direction. And I would really like to contribute to ScuiLib, too.

What do you all think?

Regards
Currently using: Hollywood 7.1 with Windows IDE

User avatar
Allanon
Posts: 461
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: New ScuiLib version?

Post by Allanon » Fri Sep 16, 2011 12:11 pm

The big problem is that my work on ScuiLib (from now on HGui) is discountinued because of real life, like all of us.
Moreover I've to complete Emula and after that I've to release AMC for MorphOS along with a great & complex update... I'd be happy to have someone to work too but right now I prefer to work alone, just because in some periods I've no time to dedicate to these projects.

Clyde, I'm not able to find your e-mail sorry! I'm receiving tons af spam and maybe I haven't noticed your message: can you tell me when you have sent it?

About the code, here it is, but don't be scared! There are several nested gadgets to test the library and the scaling routines:

Code: Select all

;--- Create a new window with a nice background ---
mywin3 = HGui.Window:new({ position = { x = 200, y = 200 }, sizemax = { w = 800, h = 400 }, background = "testbg1.jpg" })

;--- Load a sample to attach to one of the button in the example ---
test_sample = LoadSample(Nil, "TestSound.wav")

;--- Load an icon for one of our buttons and clone it with another shade for a different button state ---
GFX.Icon.Add("Test_Icon", "TestIcon.png", { w = 32, h = 32 })
GFX.Icon.TClone("Test_Icon2", "Test_Icon", { Color = $FFFFFF, Level = 128 })

;--- Interrupt gadget rendering while we are building the interface ---
HGui.SetAutoRendering(False)

;--- Gadget creations... ---
mygad1 = HGui.Gadget:new(#HGUI_BOX_GADGET,      { name = "MyGAD1", window = mywin3 })
mygad2 = HGui.Gadget:new(#HGUI_VDIVIDER_GADGET, { name = "MyGAD2", window = mywin3 })
mygad3 = HGui.Gadget:new(#HGUI_BOX_GADGET,      { name = "MyGAD3", window = mywin3 })
mygad4 = HGui.Gadget:new(#HGUI_LABEL_GADGET,    { caption = { "LABEL1" }, 
                                                  name = "MyGAD4", window = mywin3 })
mygad5 = HGui.Gadget:new(#HGUI_GROUP_GADGET,    { name = "myGAD5", 
                                                  Caption = { "GROUP" }, 
                                                  Group_LabelGap = 10,
                                                  Group_LabelSide = #HGUI_ALIGN_RIGHT, 
                                                  window = mywin3 })
mygad6 = HGui.Gadget:new(#HGUI_LABEL_GADGET,    { angle = 90, caption = { "Vertical!" }, 
                                                  name = "MyGAD6", window = mywin3 })
mygad7 = HGui.Gadget:new(#HGUI_BOX_GADGET,      { name = "MyGADsette", window = mywin3 })
mygad7a = HGui.Gadget:new(#HGUI_BUTTON_GADGET,  { tip = { "This is a [color=$ff0000]sample[/color] tip text", 
                                                          "in two [u]lines[/u]" }, 
                                                  look = { icons = { iname = "Test_Icon", 
                                                                     hname = "Test_Icon2", 
                                                                     Alignment = #HGUI_ALIGN_LEFT + 
                                                                                 #HGUI_ALIGN_VCENTER }}, 
                                                  caption = { "BUTTON", "YEAH!" },
                                                  sounds = { onpushed = test_sample }, 
                                                  actions = { onpushed = EventTester }, 
                                                  name = "MyGAD7a", window = mywin3 })
mygad7b = HGui.Gadget:new(#HGUI_BUTTON_GADGET,  { look = { vectors = { idata = GFX.Vectors.BuiltIn.sarrow_left, 
                                                                       pdata = GFX.Vectors.BuiltIn.arrow_left }}, 
                                                  caption = { "BUTTON 2" }, 
                                                  actions = { onpushed = EventTester }, 
                                                  name = "MyGAD7b", window = mywin3 })
mygad8 = HGui.Gadget:new(#HGUI_BOX_GADGET,      { name = "MyGAD8", window = mywin3 })
mygad9 = HGui.Gadget:new(#HGUI_HDIVIDER_GADGET, { name = "MyGAD9", window = mywin3 })

;--- Define GUI hierarchy & layout ---
mywin3.rootgadget:setlayout({ gadgets = { mygad1, mygad2, mygad3 },
                              weights = { -0.45, 6, 0.55 },
                              gap = 0,
                              borders = { top = 1, bottom = 1, left = 1, right = 1 } }, True )
mygad3:setlayout({ gadgets = { mygad4, mygad5 },
                               weights = { 0.20, 0.80   },
                               gap = 2,
                               borders = { top = 2, bottom = 2, left = 2, right = 2 } }, True )
mygad5:setlayout({ gadgets = { mygad6, mygad7, mygad9, mygad8 },
                               weights = { 16, 0.45, 6, -0.55 },
                               gap = 1,
                               Type = #HGUI_HORIZONTAL_LAYOUT,
                               borders = { top = 4, bottom = 4, left = 4, right = 4 } }, True )
mygad7:setlayout({ gadgets = { mygad7a, mygad7b },
                               weights = { 0.50, 0.50   },
                               gap = 2,
                               borders = { top = 2, bottom = 2, left = 2, right = 2 } }, True )

;--- Restore gadgets rendering ---
HGui.SetAutoRendering(True)

;--- Refresh the GUI ---
mywin3:draw_gui()



Repeat
   WaitEvent()
Forever
With floating tips I mean:
Image
----------------------------
[Allanon] Fabio Falcucci
AMC - Creative Development // Docs Site // Support Forum
Support me on Patreon for Hollywood libraries!

sashapont
Posts: 110
Joined: Thu Aug 03, 2017 2:49 pm

Re: New ScuiLib version?

Post by sashapont » Thu Aug 10, 2017 1:04 pm

I try to make men with ScuLib and use example code

Code: Select all

;---| INCLUDE SECTION |--------------------------------------------------------
@INCLUDE "ScuiLib_7(054).hws"
@INCLUDE "Defaults_Standard.hws"


Function item1()
    scui.FWin_Close()
EndFunction


;---| SCUILIB SYSTEM INITIALIZATION |------------------------------------------
scui.Initialize({ Title      = "Menù Test",
                  Size       = { 640, 480 },
                  Position   = { #CENTER, #CENTER },
                  Resizeable = True ,
                  Closeable  = True ,
                  Borderless = False ,
                  AutoEnd    = True ,
                  AutoClose  = True })

             mfile = { MenuName = "FILE", 
                             { Type = #IFOCLASS_BUTTON , 
                               data = { Caption = "Item 1", Action = item1 }, 
                               Status = #IFO_ENABLED },
                             { Type = #IFOCLASS_BUTTON , 
                               data = { Caption = "Item 2", Action = item1 }, 
                               Status = #IFO_ENABLED },
                             { Type = #IFOCLASS_BUTTON , 
                               data = { Caption = "Item 3", Action = item1 }, 
                               Status = #IFO_DISABLED }
                             
                        }
                              
top_menu = { { "File", mfile }, { "Edit", {} }, { "Find", {} } } 





scui.PauseObjectRendering()
scui.NewObject( #IFOCLASS_BEVELBOX , "BGFrame", { x=0, y=0 }, { x=400, y=380 } )

scui.NewObject( #IFOCLASS_BUTTON ,   "test",  
                { x =  10, y =  10 }, 
                { x = 300, y =  70 }, 
                nil, 
                { Values = { "THIS IS A SIMPLE BUTTON"  }} )
                
scui.AddChilds( "BGFrame", { "test" }, 
                           nil, 
                           { Layout = #LAYOUTMODE_VERTICAL , 
                             Borders = { Top = 1, Bottom = 1, Left = 1, Right = 1 }, 
                             Weights = { 1 }, Gap = 0 } )

scui.ResumeObjectRendering()

scui.Win.AttachMenu(#SCREENID , Top_Menu)
scui.Win.AttachGadgets(#SCREENID , "BGFrame")

Repeat
   WaitEvent 
Forever
How I can set dropdown menu position?

User avatar
Allanon
Posts: 461
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: New ScuiLib version?

Post by Allanon » Thu Aug 10, 2017 10:40 pm

Hi sashapont!
I'm the creator of ScuiLib and I'm working hard to complete the documentation of the new version called HGui, it's stable, simpler to use than ScuiLib and with more features.

So please, wait a bit more or if you are in hurry drop me a PM :)

Here is the latest status report : link
----------------------------
[Allanon] Fabio Falcucci
AMC - Creative Development // Docs Site // Support Forum
Support me on Patreon for Hollywood libraries!

Post Reply