Post by Admin on Jan 4, 2020 0:09:34 GMT
When giving this tool a facelift, it was more about remembering how I made it. (it has been a long time)
This was designed to create code based designed buttons that had an outer curved edge with a inner section
No more BMP images required for button creation, especially on BBCSDL
So how it works:
(x,y,begin,size,R,G,B,dimmer)
x,y- is where the button will be placed eg: 100,200
begin - is how far from the outside of the button the inner box is
size- is how big the overall button is
R - is the intensity of the amount of red in the button color
G - is the intensity of the amount of green in the button color
B - is the intensity of the amount of blue in the button color
dimmer- is the amount of simulated depth (or color reduction or dimming goes into the edging (higher numbers mean more abrupt dimming)
NOTE: I have tried to make sure that the COLOURs have been restored to original settings so the color modifications don't interfere with your code. This tool should not require outside tools to work on its own
* this tool has had the most modification so far of any tool. Complete modernization facelift
This was designed to create code based designed buttons that had an outer curved edge with a inner section
No more BMP images required for button creation, especially on BBCSDL
So how it works:
(x,y,begin,size,R,G,B,dimmer)
x,y- is where the button will be placed eg: 100,200
begin - is how far from the outside of the button the inner box is
size- is how big the overall button is
R - is the intensity of the amount of red in the button color
G - is the intensity of the amount of green in the button color
B - is the intensity of the amount of blue in the button color
dimmer- is the amount of simulated depth (or color reduction or dimming goes into the edging (higher numbers mean more abrupt dimming)
NOTE: I have tried to make sure that the COLOURs have been restored to original settings so the color modifications don't interfere with your code. This tool should not require outside tools to work on its own
* this tool has had the most modification so far of any tool. Complete modernization facelift
MODE 8
OFF
GCOL 1
PROC_button(500,500,20,25,190,200,190,50)
PROC_button(600,500,10,15,100,200,100,60)
PROC_button(650,500,10,15,100,200,200,60)
END
DEF PROC_button(h%,v%,begin%,size%,x%,c%,a%,di%)
LOCAL r%,g%,b%,p%
r%=x%
g%=c%
b%=a%
p%=size%-begin%
p%=p%/2
p%=begin%+p%
FOR y%=p% TO size%
COLOUR 1,x%,c%,a%
LINE h%-y%,v%-y%,h%+y%,v%-y%
LINE h%+y%,v%-y%,h%+y%,v%+y%
LINE h%+y%,v%+y%,h%-y%,v%+y%
LINE h%-y%,v%+y%,h%-y%,v%-y%
x%=x%-di%
c%=c%-di%
a%=a%-di%
IF x%<2 THEN x%=2
IF c%<2 THEN c%=2
IF a%<2 THEN a%=2
NEXT y%
p%=size%-begin%
p%=p%/2
p%=begin%+p%
FOR y%=begin%-1 TO p%
COLOUR 1,x%,c%,a%
LINE h%-y%,v%-y%,h%+y%,v%-y%
LINE h%+y%,v%-y%,h%+y%,v%+y%
LINE h%+y%,v%+y%,h%-y%,v%+y%
LINE h%-y%,v%+y%,h%-y%,v%-y%
x%=x%+di%
c%=c%+di%
a%=a%+di%
NEXT y%
COLOUR 1,r%,g%,b%
FILL h%,v%
COLOUR 0,0,0,0 :COLOUR 1,200,0,0:REM make sure colors are back to normal
ENDPROC