Is the canvas the only way to draw?
Posted: Mon Jul 12, 2021 7:32 pm
I posted the related thread below a couple days ago:
viewtopic.php?f=6&t=2159
I've been looking at example programs and looking over the manual, but I'm not sure if the canvas will do what I want.
I'm trying to have an editor where the user can draw/paint inside an area that has 32 "boxes" across and up to 176 rows going down. There will be defaults that the user can choose from:
(There are always 32 columns. That can't be changed. The user shouldn't be able to change the number of columns.)
The user also has to be able to change each row background color and each row foreground color
So the user needs to be able to change the number of rows, the height of each row, the background color of each row, and the foreground color of each row.
When finished drawing/painting, the user needs to be able to click a button to output the data in a box. Example:
So far I don't see a way to keep track of all those "boxes," row background colors, and row foreground colors using the canvas.
How do I keep track of all of that information and have it display the data when the user clicks on the button?
Once that's figured out, would it be possible for it to be able to read data and recreate it on the screen? It would look at the playfield data, pfcolors data, and bkcolors data and put it all up there ready for the user to start making changes to it.
Thanks.
viewtopic.php?f=6&t=2159
I've been looking at example programs and looking over the manual, but I'm not sure if the canvas will do what I want.
I'm trying to have an editor where the user can draw/paint inside an area that has 32 "boxes" across and up to 176 rows going down. There will be defaults that the user can choose from:
32 columns with 176 rows that are 1 pixel high
32 columns with 88 rows that are 2 pixels high
32 columns with 44 rows that are 4 pixels high
32 columns with 22 rows that are 8 pixels high
32 columns with 11 rows that are 16 pixels high
(There are always 32 columns. That can't be changed. The user shouldn't be able to change the number of columns.)
The user also has to be able to change each row background color and each row foreground color
So the user needs to be able to change the number of rows, the height of each row, the background color of each row, and the foreground color of each row.
When finished drawing/painting, the user needs to be able to click a button to output the data in a box. Example:
Code: Select all
playfield:
................................
................................
................................
................................
.XXXXX.XXXX.XX...XXXX.XXXX.XXXX.
.XX....XX...XX...XX...XX....XX..
.XXXXX.XXXX.XX...XXXX.XX....XX..
....XX.XX...XX...XX...XX....XX..
.XXXXX.XXXX.XXXX.XXXX.XXXX..XX..
................................
................................
XXXXX.XXXX.XXXX.XXXXX....XX.XX..
XX....XX...XX...XX..XX..XXXXXXX.
XXXXX.XXXX.XXXX.XX..XX...XX.XX..
...XX.XX...XX...XX..XX..XXXXXXX.
XXXXX.XXXX.XXXX.XXXXX....XX.XX..
................................
................................
................................
................................
................................
................................
end
pfcolors:
$00
$00
$00
$00
$0E
$0C
$0A
$08
$06
$00
$00
$0E
$0C
$0A
$08
$06
$00
$00
$0E
$0C
$0A
$08
$06
$00
$00
$06
end
bkcolors:
$80
$80
$80
$80
$80
$80
$80
$80
$80
$80
$80
$80
$80
$80
$80
$80
$80
$80
$80
$80
$80
$80
end
How do I keep track of all of that information and have it display the data when the user clicks on the button?
Once that's figured out, would it be possible for it to be able to read data and recreate it on the screen? It would look at the playfield data, pfcolors data, and bkcolors data and put it all up there ready for the user to start making changes to it.
Thanks.