Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void keyPressed()
- {
- codedInputs();
- nonCodedInputs();
- }
- void codedInputs()
- {
- if(key == CODED)
- {
- if(keyCode == RIGHT)
- {
- size++;
- }
- if(keyCode == LEFT)
- {
- size--;
- }
- }
- }
- void nonCodedInputs()
- {
- if(key == 's')
- {
- String saveString = "savedImage"+saveIndex+".jpg";
- saveIndex++;
- String[] toBeSaved = split(str(saveIndex), ' ');
- saveStrings(saveData, toBeSaved);
- save(saveString);
- }
- if(key == 'p')
- {
- canPixelate = !canPixelate;
- }
- if(key == 'c')
- {
- canCircullate = !canCircullate;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement