4
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

最短シンプル ofxGuiの使い方メモ

Last updated at Posted at 2015-07-02

調整に使いたかったのですが
あんまり情報がなくて調べるのが大変だったので
すっごいシンプルな例をまとめます。
スクリーンショット 2015-07-02 16.29.41.png

ofApp.h
# pragma once

# include "ofMain.h"
# include "ofxGui.h"

class ofApp : public ofBaseApp{
	public:
		void setup();
		void draw();

        ofxPanel gui;
        ofxFloatSlider circleSize;
};

ofApp.cpp
# include "ofApp.h"

//--------------------------------------------------------------
void ofApp::setup(){
    
    gui.setup();
    
    gui.add(circleSize.setup("label", 200, 0, 400));
}


//--------------------------------------------------------------
void ofApp::draw(){
    
    ofCircle(ofGetWidth()/2, ofGetHeight()/2, circleSize);
    
    gui.draw();

}

4
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?