Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Simple Switching with of Objects

$
0
0

@JDeut wrote:

Hi all -
I’m new to OF and new to C++, so I’m working slowly through the book.

Generally, I like to learn by figuring out little modifications to the examples provided.

For example 1_ii_b Bursting_Rect_Brush, I’d like to be able to do two things:

  1. Stop the color from refreshing when the mouse is not pressed.

  2. Randomly toggle between ofDrawRect and ofDrawCircle. The ofDrawRect is located inside of a For loop. I’m imagining there is a way to create an array of modules and some kind of “choose” method, so that each iteration of the For loop makes a selection. I just have no idea how to do this.

Any suggestions?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles