Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oF 0.8.0 Compatibility #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Controls/ofxSimpleGuiButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ void ofxSimpleGuiButton::onRelease(int x, int y, int button) {
}

void ofxSimpleGuiButton::draw(float x, float y) {
setPos(x, y);
setPosition(x, y);

glPushMatrix();
glTranslatef(x, y, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/ofxSimpleGuiColorPicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void ofxSimpleGuiColorPicker::draw(float x, float y) {
// enabled = true;

//update postion of gui object
setPos(x, y);
setPosition(x, y);
glPushMatrix();
glTranslatef(x, y, 0);

Expand Down
2 changes: 1 addition & 1 deletion src/Controls/ofxSimpleGuiComboBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void ofxSimpleGuiComboBox::draw(float x, float y) {
//we assume a max of 256 characters.
char choiceBuf[256];

setPos(x, y);
setPosition(x, y);

glPushMatrix();
glTranslatef(x, y, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/ofxSimpleGuiContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void ofxSimpleGuiContent::setup() {
void ofxSimpleGuiContent::draw(float x, float y) {
if(content->getWidth() == 0 && content->getHeight() ==0) return;

setPos(x, y);
setPosition(x, y);
setup();

glPushMatrix();
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/ofxSimpleGuiFPSCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void ofxSimpleGuiFPSCounter::setup() {


void ofxSimpleGuiFPSCounter::draw(float x, float y) {
setPos(x, y);
setPosition(x, y);

glPushMatrix();
glTranslatef(x, y, 0);
Expand Down
4 changes: 2 additions & 2 deletions src/Controls/ofxSimpleGuiQuadWarp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
ofxSimpleGuiQuadWarp::ofxSimpleGuiQuadWarp(string name, ofBaseDraws &baseDraw, ofPoint *pts) : ofxSimpleGuiControl(name) {
this->baseDraw = &baseDraw;

setPos(0, 0);
setPosition(0, 0);
setSize(baseDraw.getWidth(), baseDraw.getHeight());

curPoint = NULL;
Expand Down Expand Up @@ -94,7 +94,7 @@ void ofxSimpleGuiQuadWarp::onDragOutside(int x, int y, int button) {

//---------------------------------------------------------------------
void ofxSimpleGuiQuadWarp::draw(float x, float y) {
setPos(x, y);
setPosition(x, y);
glPushMatrix();
glTranslatef(x, y, 0);
glColor3f(1, 1, 1);
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/ofxSimpleGuiSlider2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void ofxSimpleGuiSlider2d::update() {
}

void ofxSimpleGuiSlider2d::draw(float x, float y) {
setPos(x, y);
setPosition(x, y);
ofPoint pointv;
pointv.x = ofMap((*value).x, min.x, max.x, x, x+width);
pointv.y = ofMap((*value).y, min.y, max.y, y, y+height-config->slider2DTextHeight);
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/ofxSimpleGuiSliderBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ template <typename Type> class ofxSimpleGuiSliderBase : public ofxSimpleGuiContr
// enabled = true;

//update postion of gui object
setPos(x, y);
setPosition(x, y);

//VALUE CLAMP
barwidth = ofMap((*value), min, max, 0.0, (float)width);
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/ofxSimpleGuiTitle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void ofxSimpleGuiTitle::onRelease(int x, int y, int button) {
}

void ofxSimpleGuiTitle::draw(float x, float y) {
setPos(x, y);
setPosition(x, y);

if(hasTitle == false) return;

Expand Down
2 changes: 1 addition & 1 deletion src/Controls/ofxSimpleGuiToggle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void ofxSimpleGuiToggle::update() {

void ofxSimpleGuiToggle::draw(float x, float y) {
// enabled = true;
setPos(x, y);
setPosition(x, y);

glPushMatrix();
glTranslatef(x, y, 0);
Expand Down
4 changes: 2 additions & 2 deletions src/ofxSimpleGuiControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ofxSimpleGuiControl::ofxSimpleGuiControl(string name) {
this->config = &defaultSimpleGuiConfig;
setName(name);
setKey(key);
setPos(0, 0);
setPosition(0, 0);
lock = false;
focused = false;
newColumn = false;
Expand Down Expand Up @@ -101,7 +101,7 @@ ofxSimpleGuiControl &ofxSimpleGuiControl::setTextBGColor(bool clickable) {
}

ofxSimpleGuiControl &ofxSimpleGuiControl::setFullColor(bool forceActive) {
if(isMouseDown() || forceActive) ofSetHexColor(config->fullActiveColor);
if(isMousePressed() || forceActive) ofSetHexColor(config->fullActiveColor);
else if(isMouseOver()) ofSetHexColor(config->fullOverColor);
else ofSetHexColor(config->fullColor);
return *this;
Expand Down
2 changes: 1 addition & 1 deletion src/ofxSimpleGuiPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ float ofxSimpleGuiPage::getNextY(float y) {


void ofxSimpleGuiPage::draw(float x, float y, bool alignRight) {
setPos(x += config->offset.x, y += config->offset.y);
setPosition(x += config->offset.x, y += config->offset.y);
if(alignRight) x = ofGetWidth() - x - config->gridSize.x;

float posX = 0;
Expand Down
26 changes: 13 additions & 13 deletions src/ofxSimpleGuiToo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,40 +65,40 @@ void ofxSimpleGuiToo::setup() {
setDraw(false);
setPage(1);

ofAddListener(ofEvents.keyPressed, this, &ofxSimpleGuiToo::keyPressed);
ofAddListener(ofEvents().keyPressed, this, &ofxSimpleGuiToo::keyPressed);
}



void ofxSimpleGuiToo::addListeners() {
// ofAddListener(ofEvents.setup, this, &ofxSimpleGuiToo::setup);
ofAddListener(ofEvents.update, this, &ofxSimpleGuiToo::update);
ofAddListener(ofEvents().update, this, &ofxSimpleGuiToo::update);
// ofAddListener(ofEvents.draw, this, &ofxSimpleGuiToo::draw);
// ofAddListener(ofEvents.exit, this, &ofxSimpleGuiToo::exit);

ofAddListener(ofEvents.mousePressed, this, &ofxSimpleGuiToo::mousePressed);
ofAddListener(ofEvents.mouseMoved, this, &ofxSimpleGuiToo::mouseMoved);
ofAddListener(ofEvents.mouseDragged, this, &ofxSimpleGuiToo::mouseDragged);
ofAddListener(ofEvents.mouseReleased, this, &ofxSimpleGuiToo::mouseReleased);
ofAddListener(ofEvents().mousePressed, this, &ofxSimpleGuiToo::mousePressed);
ofAddListener(ofEvents().mouseMoved, this, &ofxSimpleGuiToo::mouseMoved);
ofAddListener(ofEvents().mouseDragged, this, &ofxSimpleGuiToo::mouseDragged);
ofAddListener(ofEvents().mouseReleased, this, &ofxSimpleGuiToo::mouseReleased);

// ofAddListener(ofEvents.keyPressed, this, &ofxSimpleGuiToo::keyPressed);
ofAddListener(ofEvents.keyReleased, this, &ofxSimpleGuiToo::keyReleased);
ofAddListener(ofEvents().keyReleased, this, &ofxSimpleGuiToo::keyReleased);
}


void ofxSimpleGuiToo::removeListeners() {
// ofRemoveListener(ofEvents.setup, this, &ofxSimpleGuiToo::setup);
ofRemoveListener(ofEvents.update, this, &ofxSimpleGuiToo::update);
ofRemoveListener(ofEvents().update, this, &ofxSimpleGuiToo::update);
// ofRemoveListener(ofEvents.draw, this, &ofxSimpleGuiToo::draw);
// ofRemoveListener(ofEvents.exit, this, &ofxSimpleGuiToo::exit);

ofRemoveListener(ofEvents.mousePressed, this, &ofxSimpleGuiToo::mousePressed);
ofRemoveListener(ofEvents.mouseMoved, this, &ofxSimpleGuiToo::mouseMoved);
ofRemoveListener(ofEvents.mouseDragged, this, &ofxSimpleGuiToo::mouseDragged);
ofRemoveListener(ofEvents.mouseReleased, this, &ofxSimpleGuiToo::mouseReleased);
ofRemoveListener(ofEvents().mousePressed, this, &ofxSimpleGuiToo::mousePressed);
ofRemoveListener(ofEvents().mouseMoved, this, &ofxSimpleGuiToo::mouseMoved);
ofRemoveListener(ofEvents().mouseDragged, this, &ofxSimpleGuiToo::mouseDragged);
ofRemoveListener(ofEvents().mouseReleased, this, &ofxSimpleGuiToo::mouseReleased);

// ofRemoveListener(ofEvents.keyPressed, this, &ofxSimpleGuiToo::keyPressed);
ofRemoveListener(ofEvents.keyReleased, this, &ofxSimpleGuiToo::keyReleased);
ofRemoveListener(ofEvents().keyReleased, this, &ofxSimpleGuiToo::keyReleased);
}

void ofxSimpleGuiToo::setDraw(bool b) {
Expand Down