'===============
'COLORPICKER.BAS v1.2
'===============
'Simple to use color picker function.
'Coded by Dav for QB64-GL 1.4, SEP/2020
'Follow this programs development here:
'https://www.qb64.org/forum/index.php?topic=2989.0
'Use mouse, hover over color to pick..
'Click left mouse button to select the color.
'Press CLOSE to exit picker and return selected color.
'NEW for v 1.2 - Complete function now using built-in image
'===== DEMO OF USING COLORPICKER =======
'=== draw stuff
clr& = ColorPicker&(75, 150)
'=== break clr& into RGB valued
'=== draw something to show color picked
LINE (50, 50)-(150, 150), _RGB(red
, grn
, blu
), BF
'=== Print color values to user
PRINT "Selected color: "; clr&; red; grn; blu
PRINT "No color selected"
'===== COLORPICKER DEMO ENDS HERE =====
'==================================================================
'ColorPicker& Function by Dav, SEP/2020. FREE TO USE FOR ALL
'Function Returns color picked by user if one selected.
'If no color selected before Closing, function returns 0
'Click CLOSE to close the ColorPicker image.
'ESC key cancels selection and closes picker too.
'The xpos/ypos is x/y point on the screen to place colorpicker
'=== Save users display status
'=== copy background screen using _mem (thanks Steve!)
'=== Used this method because_COPYIMAGE(_DISPLAY) didnt always work
_MEMCOPY scr1
, scr1.OFFSET
, scr1.SIZE
TO scr2
, scr2.OFFSET
'Create Colorpicker image
A$ = "" '...COLORPICKER.PNG encoded by BASIMAGE...
A$ = A$ + "haIkMo7KDGOh77_oaBfFFfOhBL9c5gGWaX9BRK62K46AkHnS9I=`09EP<4V="
A$ = A$ + "e25F]0eB;]jK;#YFXUEJQJGM573`644fjGM:62H66L42I^89^HF<co`T]oHo"
A$ = A$ + "anW]TUUk;O2BnLONnmjek3L7m>li;cS4;]LohSGjC_[gM=C6WciL>WciL>Wc"
A$ = A$ + "iL>WciL>WciL>WciLOFMgBE9=CX6XN80S0C0W7n48C2O2LNH2H480e3e0c4^"
A$ = A$ + "5XZHUa7hn4hl`4`8#0Z7Z1V9L;#boQOFngVWjlLWGjhUNN]SGkiAW:SK^U[]"
A$ = A$ + "lUDW:cUmbnoNZbCf>]MJkdfYVnIk\bR]CKWf>o\C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Wol>?mY?M9Ef;4Z^T:iiEXT:aomj"
A$ = A$ + "BOLYDRK7NY?^DJjjflCe\MJkdfIUKk\D=KWf>]MVoIkdfY]CKWCeY]]CKWf>"
A$ = A$ + "C^fJ]W4J7j0j42#G`FP]1M3mT#g`fP]0M11XCX3XMX=XeH]1]3M0M21X;H;`"
A$ = A$ + "fP^QNRe=\=H;#G#0j4j0J7J3J=QfPfQ>P>Q0d5\5HK#g#?aj6f6\5X;80M2M"
A$ = A$ + "0]3]1]6;GcfY]CKWf>]MJkdfY]cXIkdfY]CKWf>]MJkdfiU?_\MJkdfY]CKW"
A$ = A$ + "f>]MJkdfY]CKWf>]M>IWff>]MJk<i\MJkdfY]cYjdffY]CKW9W]cdf>cjOgf"
A$ = A$ + "Y]CKWf>]MJkdfY]CKWf>caY]]CKWf>C^>flFCXcY`c01hiP^V2K1fJ2K1jJ:"
A$ = A$ + "lL#0N6XcY#7`Vc\e>nDMVeonEnhliIP0lL#GCQ]0K=fFP^V2?74PW1jL:d1\"
A$ = A$ + "i4j0jL:l<#0N>X[Y`FP]6K;#GCQW32`c0M>5j0fL\L=KWf>]MJkdfY]CKWf>"
A$ = A$ + "SV]CKWf>]MJkdfY]CKWGnlbfY]c?3g>_R>f\]CKWf>]MJkdfY]CKWf>]MVcC"
A$ = A$ + "KKWf>]MVLf>]MJkdfiDMJKkdfY]cTcf9KUiX?>E]c9kcIkdfI9^MNmjkSHkd"
A$ = A$ + "fY]cTcfY]CKWEV]CWciL>WciL>WciL>WciL>WciL>W;OkoC[%%L2"
btemp$ = "" 'decode string data to image data
IF F$
<> "%" THEN C$
= C$
+ F$
B&
= B&
* 64 + ASC(MID$(B$
, t%
)) - 48 X$
= X$
+ CHR$(B&
AND 255): B&
= B& \
256
'Put colorpicker image on screen at xpos/ypos
'====================================
'=== Now get users color selection...
'=== no selection made yet
selected = 0
'=== main loop
'=== Get mouse input
'=== Get mouse x/y
'=== Only poll this area
IF mx
< (xpos
+ 473) AND my
< (ypos
+ 243) THEN '=== if click button in area
'=== if clicked in CLOSE box area
IF mx
> (xpos
+ 352) AND mx
< (xpos
+ 457) AND my
> (ypos
+ 5) AND my
< (ypos
+ 72) THEN '=== made a color selection
selected = 1
'=== Get color where mouse pointer is
'=== Make Red Green Blue color values
'=== show color selected in box
LINE ((xpos
+ 246), (ypos
+ 7))-((xpos
+ 347), (ypos
+ 70)), _RGB(red
, grn
, blu
), BF
'=== Update gradient strip with color...
'=== ...only if mouse not in gradient strip area
IF mx
<= (xpos
+ 246) OR mx
>= (xpos
+ 457) OR my
<= (ypos
+ 77) OR my
>= (ypos
+ 107) THEN c = 0
LINE (x
, (ypos
+ 77))-(x
+ 4, (ypos
+ 107)), _RGB(red
+ c
, grn
+ c
, blu
+ c
), BF
c = c + 4
'=== update screen
'=== ESC key cancels picking and closes
selected
= 0:
GOTO donepicking
'=== don't be a cpu pig
donepicking:
'=== wait for mouse button UP to continue
'=== if user selected color, say so
ColorPicker& = clr&
ColorPicker& = 0
'====================================
'Restore background as it was
_MEMCOPY scr2
, scr2.OFFSET
, scr2.SIZE
TO scr1
, scr1.OFFSET
'Restore display status as it was