Where is the mistake ? ScuiLib Cyclegadget doesn't work..

Discuss any general programming issues here
Post Reply
gerograph
Posts: 27
Joined: Thu Mar 04, 2010 9:38 pm

Where is the mistake ? ScuiLib Cyclegadget doesn't work..

Post by gerograph » Thu Mar 04, 2010 10:29 pm

Hi,

   as I am absolutely new regarding ScuiLib (and Hollywood), the question might be solved by going through tutorials and manuals (rtfm.... gerograph !!!). But anyway, forgive me, this might be the faster way to solve it:

I did 5 pages with designer, and put "next" and "back" buttons on it ("Designer buttons" not ScuiLib...). On one page I want to use a Cyclegadget from ScuiLib, but I cannot use the next button anymore, as soon as I use the Cyclegadget. What is wrong ??? Her is my code:

Code: Select all


******************* BEGIN PAGE #3 ********************/
pages[3] = Function()
bc = 0
ac = 0
CreateBGPic(1, 380, 240, $DFDFDF)
SelectBGPic(1)
SetFormStyle(#NORMAL)
SetFillStyle(#FILLCOLOR)
Box(-8, 0, 390, 145, $FFFFA3, 0, 0)
SetFont("helvetica.font", 13)
SetFontColor($0)
t$ = "Where will mp3 files be stored, in relation to new playlist ?"
TextOut(20, 110, t$, #LEFT, 0)
LoadBrush(1, "Brushes/btn_langtempl.png", {})
DisplayBrush(1, 17, 201)
LoadBrush(2, "Brushes/btn_langtempl.png", {})
DisplayBrush(2, 265, 201)
SetFont("helvetica.font", 13)
SetFontColor($0)
t$ = "Back"
TextOut(51, 208, t$, #LEFT, 0)
HideLayer(5)
SetFont("helvetica.font", 13)
SetFontColor($0)
t$ = "Next"
TextOut(303, 209, t$, #LEFT, 0)
HideLayer(6)
LoadBrush(3, "Brushes/F3.png", {})
DisplayBrush(3, 0, 0)
HideLayer(7)
bc = 3
ac = 0



MakeButton(2, #LAYERBUTTON, 3, 0, 1, {

OnMouseDown = Function()
nextpage = 2
Return
EndFunction})


MakeButton(3, #LAYERBUTTON, 4, 0, 1, {

OnMouseDown = Function()
nextpage = 5
Return
EndFunction})

scui.NewObject(
  #IFOCLASS_CYCLE,
  "Cycle1",
  nil,
  nil,
  nil,
  { Options = { "Option 1", "Option 2", "Option 3", "Option 4" },
    DefaultOption = 2 }
)

EndSelect
DisplayBGPic(1)
ShowLayer(5)
ShowLayer(6)
ShowLayer(7)
nextpage = 0


Repeat
WaitEvent
Until nextpage > 0
scui.removeobject("Cycle1")
Return(nextpage)
EndFunction  
Anybody an Idea ???

Thanx

User avatar
airsoftsoftwair
Posts: 3072
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Where is the mistake ? ScuiLib Cyclegadget doesn't work..

Post by airsoftsoftwair » Fri Mar 05, 2010 10:39 pm

AFAIK ScuiLib doesn't work when layers are enabled but we better wait for Allanon to give us the latest 411 on ScuiLib :)

gerograph
Posts: 27
Joined: Thu Mar 04, 2010 9:38 pm

Re: Where is the mistake ? ScuiLib Cyclegadget doesn't work..

Post by gerograph » Sat Mar 06, 2010 10:02 am

Thanks for infos, rather wait for ScuiLib 411 or do it without layer/Designer ?

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

Re: Where is the mistake ? ScuiLib Cyclegadget doesn't work..

Post by Allanon » Sat Mar 06, 2010 9:54 pm

Andreas is right,
the latest public version does not work well with layer enabled, but the problem of your not working "next button" is caused by the way ScuiLib manage the Hollywood buttons.
When I started to develop the library Hollywood didn't allowed to assign automatically id to objects so ScuiLib has started using buttons from number 1, in few words when you have created the cycle gadget ScuiLib has overwrited your next button... Now many things has changed, even cycle gadgets works better and faster thanks to the multi-window feature (along with the others) that Hollywood has introduced.

If you want (gerograph and anyone interested) the latest ScuiLib I've not problems to public it, but I'm still writing documentation so many features are undocumented and other are documented partially, if there is interest I will public as soos as possible along with the available documentation ;)

Returnig to your specific problem try assigning higher id to your non-ScuiLib buttons because my Lib will start using buttons from number one (it's planned to remove this limit of course :) )
----------------------------
[Allanon] Fabio Falcucci
AMC - Creative Development // Docs Site // Support Forum
Support me on Patreon for Hollywood libraries!

gerograph
Posts: 27
Joined: Thu Mar 04, 2010 9:38 pm

Re: Where is the mistake ? ScuiLib Cyclegadget doesn't work..

Post by gerograph » Sat Mar 27, 2010 11:39 pm

O.K. thanks, solved...

Post Reply