My latest problem, which will be down to misunderstanding how this works...
In the code below, I have a number of spinners. The first and last spinner corrupt one another - if I change spinner 1 (Font Size), it updates itself and also spinner number 4 (constant). Likewise, spinner 4 updates spinner 1. They even force the opposite spinner to update outside of it's min/max boundaries.
If I rearrange the spinners in the code - for example make Zoom the 4th spinner, the problem occurs between spinner 1 and 4, in the code sequence that they are created. Position on screen is irrelevant.
win = guiWindowBegin(GEN_ID, winX,winY,winWidth,winHeight, "Parameters",0,1)
` *** STYLES
guiListBoxBegin(GEN_ID, StyleListX,StyleListY,controlWidth,StyleListHeight,0,0,0,1)
for i = 1 to array count(arrListStyle())
if guiListboxItem(arrListStyle(i), 0, StyleListItem = i)
StyleListItem = i
gGui.state = cSTATE_CHANGE
endif
next i
guiListboxEnd()
` *** FONT SIZE
guiLabel(GEN_ID, 5, FontSizeY, 120,30, "Font Size",0,1,RGB(255,255,255))
fSpinnerValue = guiSpinner(GEN_ID, FontSizeX, FontSizeY, FontSizeWidth, FontSizeHeight, FontSizeSpinnerValue, 10, 600, 1, 0, 1)
If fSpinnerValue <> FontSizeSpinnerValue
FontSizeSpinnerValue = fSpinnerValue
gGui.state = cSTATE_CHANGECURRENT
endif
` *** Amount
guiLabel(GEN_ID, 5, AmountY, 120,30, "Amount",0,1,RGB(255,255,255))
aSpinnerValue# = guiSpinner(GEN_ID, AmountX, AmountY, AmountWidth, AmountHeight, AmountSpinnerValue#, 0.01, 5.0, 0.01, 2, 1)
If aSpinnerValue# <> AmountSpinnerValue#
AmountSpinnerValue# = aSpinnerValue#
gGui.state = cSTATE_CHANGECURRENT
endif
` *** ZOOM
guiLabel(GEN_ID, 5, ZoomY, 120,30, "Zoom",0,1,RGB(255,255,255))
SpinnerValue# = guiSpinner(GEN_ID, ZoomX, ZoomY, ZoomWidth, ZoomHeight, ZoomSpinnerValue#, 0.01, 5.0, 0.01, 2, 1)
If SpinnerValue# <> ZoomSpinnerValue#
ZoomSpinnerValue# = SpinnerValue#
gGui.state = cSTATE_CHANGECURRENT
endif
` *** CONSTANT
guiLabel(GEN_ID, 5, ConstantY, 120,30, "Constant",0,1,RGB(255,255,255))
SpinnerValue# = guiSpinner(GEN_ID, ConstantX, ConstantY, ConstantWidth, ConstantHeight, ConstantSpinnerValue#, 0.01, 5.0, 0.01, 2, 1)
If SpinnerValue# <> ConstantSpinnerValue#
ConstantSpinnerValue# = SpinnerValue#
gGui.state = cSTATE_CHANGECURRENT
endif
` *** TextX
guiLabel(GEN_ID, 5, TextXY, 120,30, "Text X Pos",0,1,RGB(255,255,255))
SliderValue# = guiHSlider(GEN_ID, TextXX, TextXY, TextXWidth, TextXHeight, TextXSliderValue#, 100,20)
If SliderValue# <> TextXSliderValue#
TextXSliderValue# = SliderValue#
gGui.state = cSTATE_CHANGECURRENT
endif
` *** TextY
guiLabel(GEN_ID, 5, TextYY, 120,30, "Text Y Pos",0,1,RGB(255,255,255))
SliderValue# = guiHSlider(GEN_ID, TextYX, TextYY, TextYWidth, TextYHeight, TextYSliderValue#, 100,20)
If SliderValue# <> TextYSliderValue#
TextYSliderValue# = SliderValue#
gGui.state = cSTATE_CHANGECURRENT
endif
` ******* STYLES
guiListBoxBegin(GEN_ID, FontStyleX,FontStyleY,FontStyleWidth,FontStyleHeight,windowScrollX1,windowScrollY1,0,1)
for i = 1 to array count(arrListFonts())
if guiListboxItem(arrListFonts(i), 0, FontListItem = i)
FontListItem = i
FontStyle$ = arrListFonts(i)
a2DeleteFont guiFont
guiFont = a2CreateFont(FontStyle$,FontSize, a2Size_Char(), a2Style_Normal())
gGui.state = cSTATE_CHANGECURRENT
endif
next i
guiListboxEnd()
windowScrollX1 = guiScrollX()
windowScrollY1 = guiScrollY()
guiWindowEnd()
