Can you comment/correct this improvements ?, here are my temporary changes :
(without docs enhanced only what I see to improve for my purposes...)
1/ new custom color for 'Dot' in Radiobutton gadget
- added global variable 'dotColor'
- 'Dot' routine slightly changed
Code: Select all
'NEW - in "sGUI.bas"
static shared as uinteger dotColor=rgb(0,0,0)
'OLD - in "sGUI_Drawing.bas"
'declare sub Dot (xpos as integer,ypos as integer, col as uinteger)
'...
'sub Dot (xpos as integer,ypos as integer, col as uinteger)
' dim as uinteger topleft,bottomright
' topleft=ShiftRGB(col,contrast/2)
' bottomright=ShiftRGB(col,-contrast/2)
'...
'NEW - in "sGUI_Drawing.bas"
declare sub Dot (xpos as integer,ypos as integer)
'...
sub Dot (xpos as integer,ypos as integer)
dim as uinteger topleft,bottomright,col
'passed global variable
col=dotColor 'col is GadgetColor or user defined
topleft=ShiftRGB(col,contrast/2)
bottomright=ShiftRGB(col,-contrast/2)
'...
Code: Select all
'NEW - in "Demo_ActivationTest.bas"
dim as Gadget ptr label2
dim as Gadget ptr radioaH,radiobH,radiocH
'...
'menu (event,1,6,1,"End")
'dotColor=
label2=AddLabel(event,10,380,"a dynamic widget with custom Dot color added",rgb(192,192,192))
'note: if placed as priority dynamic widget >> plus Save & Renew background needed (similar as in 'MessageBox' )
line (10,415)-(280,440),rgb(128,128,0),BF
radioaH =AddRadioButton(event,20,420,1,"Hori",0)
radiobH =AddRadioButton(event,80,420,0,"zon",radioaH)
radiocH =AddRadioButton(event,130,420,0,"tal radioButton",radioaH)
GadgetOn (label2,radiocH)
dotColor=GadgetColor
'...
Code: Select all
'Changed Do-Loop cycle - in "MessageBox.bas"
do
event->xSleep(1,0)
'new - if some KEY pressed ..
' if more MessageBoxes opened - problems ??
if KEY<>"" then
'MsgType OK and YESNO
if ASCCODE=13 and MsgType=MBType_OK then result=MBButton_OK
if ASCCODE=13 and MsgType=MBType_YESNO then result=MBButton_YES
if ASCCODE<>13 and MsgType=MBType_YESNO then result=MBButton_NO
'other MsgType howto define ?
event->EXITEVENT=1
end if
if event->GADGETMESSAGE then
'...