This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Gumball's profile picture

ApplePAINT

Started by Gumball, 16 October 2014 - 11:14 PM
Gumball #1
Posted 17 October 2014 - 01:14 AM
Hi, this is my little paint program I made while I was just playing around with stuff, so enjoy! Also, if you like this, goto the "AppleOS"
topic in the OS section of the forums, it comes with the paint program!

pastebin:

0DkyHLGX
Dog #2
Posted 17 October 2014 - 03:08 AM
This is a pretty good start on a nice little paint program! I like it!

A couple of questions:
- What is the '#' near the bottom right?
- Is it possible to load and save images?

Some suggestions:
- The color selection indicator is currently unreliable - it doesn't show every color selected and sometimes disappears/turns white
- The color selection bar doesn't always work right (sometimes I get the wrong color) - and right clicking on the select bar seems to really confuse it
- It would be neat if you could select different colors for the left and right mouse buttons
- I think it would be nicer if the color bar on the right was a couple lines lower so that it's clearly separate from the 'Exit' button at the top
- It would be nice to have all the colors available
- It would also be nice to have a way to fill the background with a color and/or clear the image

Looking forward to seeing where to take this program…
Edited on 17 October 2014 - 01:15 AM
Gumball #3
Posted 18 October 2014 - 12:32 AM
Thanks for the feedback! The "#" is delete, but no, its not possible save and open, that probably will be added! But I need help with that. Maybe if you make this piece of code work, I could add saving :)/>

and, the color thingy turns white because its not a button, thus making it over-ridable, also, the other glitch is I jut accidentally forgot to add the thing when you click a button, it puts that color down there.

And also, that WOULD have been added, infact, I even tried that where theres a button thats says: "Tool: paint-brush" or "Tool: line-fill" but whenever you click it, it moves the screen down, even tough I did

term.setCursorPos(blahblah)
print("								   ") --to clear what it said
term.setCursorPos(blahblahrottencheese)
print("Tool: "..tool)

That didn't work. -_-/>

:

clickedInfo = (X,Y,color)
clicked (the index table where it saves the click data) = clicked + clickedInfo

but it didn;t work ;(

What its supposed to do:

get where you clicked, and the color selected, then, save it into a table and when you hit save, it saves the colors in letters, like red is r, to a file with the info.

But it didn't work :(/> . Could you, or atleast someone else pls help? Thanks!

-bluebird
Edited on 17 October 2014 - 10:40 PM
Dog #4
Posted 18 October 2014 - 04:09 AM
I'm in the middle of some other projects, atm, but I can *probably* write a little block of code for you that would handle saving and loading files - not a problem - it'll just have to wait until I have the time. I'll see if I can make some time over the weekend.
Gumball #5
Posted 18 October 2014 - 05:49 AM
I'm in the middle of some other projects, atm, but I can *probably* write a little block of code for you that would handle saving and loading files - not a problem - it'll just have to wait until I have the time. I'll see if I can make some time over the weekend.

Thanks! If you want you can use the code and add to it, if you do that then pls make the save/exit button in the same way and place the exit button is, makes it look better, also, if you do, on the open thingy make it pop open a window that lists files that end with .png :D/>. Thanks!