Hello
I have a problem with BlueGUI; progressbar commands and scrollbar commands doesn't works...
Here is the code I have written and which does not work as I want:
Main:
setautoupdate bottomProgress,1
setprogressbarrange bottomProgress,0,100
do
`Get information about gadget events
getEvent
`Process event information
processEvents()
`Non-windows related code goes here
if cos(x#)>=0
currim=1
else
currim=2
endif
paste image currim,0,0
x#=x#+0.6
setstatustext Statuts,1,"Image n°"+str$(currim)
currentCos=int((cos(x#)+1)*50)
setstatustext Statuts,3,left$(str$(currentCos),3)
setscrollbarrange magnScroll,0,10
setstatustext Statuts,4,"m:"+str$(getscrollbarmin(magnScroll))+"M:"+str$(getscrollbarmax(magnScroll))
setprogressbarpos bottomProgress,currentCos
rem sync
loop
Layout.dba:
rem If Not GUI_CONSTANTS Then errorMessage "GUI Constants not defined. Please include gui.dba when you compile !" : end
rem // Fenetre:
maximize window
MainSimulWindow=creategadgetfromwindow(mainwindow())
setgadgetvisible MainSimulWindow,0
setgadgettext MainSimulWindow,"TPE - Simulation 3D - Séismes"
rightPanel=createpanel(gadgetwidth(MainSimulWindow)-265,0,1000,gadgetheight(MainSimulWindow)-(gadgetheight(MainSimulWindow)-710),MainSimulWindow)
bottomPanel=createpanel(0,710,1500,(gadgetheight(MainSimulWindow)-800)+16,MainSimulWindow)
Statuts=createStatusBar(MainSimulWindow)
Simulation=0
Parametres=createFrame(6,0,240,710,"Parametres :",rightPanel)
Informations=createFrame(5,0,1264,215,"Informations :",bottomPanel)
bottomProgress=createprogressbar(153,4,144,14,Statuts)
setprogressbarrange bottomProgress,0,100
setprogressbarpos bottomProgress,rnd(100)
magnLabel=createlabel(15,40,210,20,"Magnitude du séisme :",Parametres)
magnScroll=createscrollbar(15,60,210,20,0,Parametres)
magnValue=createlabel(15,80,210,20,"Valeur :",Parametres)
antiLabel=createlabel(15,120,210,20,"Moyens antisismiques :",Parametres)
anticombo=createcombobox(15,140,210,20,Parametres)
additem anticombo,"Murs sans moyens antisismiques"
additem anticombo,"Murs en cellulose (Japon)"
additem anticombo,"Murs avec couches de caoutchout"
selectitem anticombo,0
setscrollbarrange magnScroll,0,10
addstatuspanel Statuts,150
addstatuspanel Statuts,151
addstatuspanel Statuts,150
addstatuspanel Statuts,10000
setstatustext Statuts,1,"Event en cours :"
I want the program to indicate the value of scrollbar and to set the good position for the progressbar.
Can anyone help me?
Thanks in advance
RTS game project : 3.2% finished
|||%