jcgter777 wrote:
_iPhoenix_ wrote:
It seems someone else likes adding ascii art to the top of their readme files
It would also be cool if you expanded this program to include a color picker.
How? Like adding a color menu, storing that value to a var, and using that var in the color theme?
I think more like displaying the palette and allowing users to move through it Kind of like the bottom half of this screenshot
EDIT ok I found the old code from my TILES program, which oddly enough, I've never shared. It was written in hybrid-basic for the CSE, but it should be relatively straightforward to port to ICE. except that the commands that have to do with displaying stuff would change.
Code: If F=1 and (K=21 or K=105 //if the color picker option is selected
Then
real(8,1,1
real(8,2,0 //swap buffers
If 1!=real(7,1,7,3 //if the palette hasn't been drawn yet
Then
real(0,3,4,0
For(K,0,35,5
For([recursiven],0,155,5
real(7,9,[recursiven],K,5,5,G //draw the palette
G+1->G
End:End
End
DelVar G2+5remainder(E,32->R
2+5int(E/32->H
real(7,6,0,H,160,H //invert a line at position H
real(7,6,R,0,R,39 //invert a line at position R
real(6,1,90,80,255,E //display the color value in E
real(7,9,20,70,30,30,E //display a larger square the color of the selected value
Repeat max(K={105,21
Repeat max(K={105,21,24,25,26,34
getKey->K //take user input
End
real(7,9,90,80,24,9,0 //erase the color value and square
real(7,6,0,H,160,H,0 //erase the inverted line at H
real(7,6,R,0,R,39,0 //erase the inverted line at R
If K=34 or 2>abs(K-25
Then
If 1=abs(K-25
Then
remainder(R+35+5K,160->R //move the inverted line position 5 pixels if left or right were pressed
Else
remainder(H+40-5((K=25)-(K=34)),40->H //move the inverted line position 5 pixels if up or down were pressed
End
real(7,6,0,H,160,H,0 //invert new line H
real(7,6,R,0,R,39,0 //invert new line R
real(7,1,R,H->E //get the color value of the new position in E
real(6,1,90,80,255,E //display the new color value
real(7,9,20,70,30,30,E //display the square of the selected color
End
End
real(8,1,0
real(8,2,0 //switch the buffer back
real(7,3,12,105,E,8 //set the new color to the selected one
End