_TITLE "Color Dialog rev 2020-06-27" 'b+ 2020-06-27
'first screen dimensions items to restore at exit
'save old settings to restore at end ofsub
'screen snapshot
r = 128: g = 128: b = 128: a = 255
COLOR &HFFDDDDDD, &HFF000000 slider 16, 10, r, "Red"
slider 16, 60, g, "Green"
slider 16, 110, b, "Blue"
slider 16, 160, a, "Alpha"
COLOR &HFFDDDDDD, &HFF000000 _PRINTSTRING (150, 230), "Current Color Setting is shown below (Alphas on Black Background)" _PRINTSTRING (150, 260), "Press Enter or Spacebar, if you want to use the color: " + makeConst$
_PRINTSTRING (210, 280), "Press Escape or Q to not use any color, returns 0." LINE (90, 300)-(710, 590), &HFF000000, BF
LINE (90, 300)-(710, 590), VAL(makeConst$
), BF
'put things back
'clear key presses
'clear mouse clicks
SUB slider
(x
, y
, value
, label$
) CASE "Red": c~&
= &HFFFF0000 CASE "Green": c~&
= &HFF008800 CASE "Blue": c~&
= &HFF0000FF CASE "Alpha": c~&
= &H88FFFFFF LINE (x
, y
)-STEP(3 * value
, 40), c~&
, BF
s$ = label$ + " = " + s3$