From 573eb16599a238c442cd3eee540d4d687c6a08e7 Mon Sep 17 00:00:00 2001 From: Anthony Marefat Date: Sun, 3 Nov 2013 14:54:03 -0500 Subject: [PATCH] I fixed it? --- src/Controls/ofxSimpleGuiButton.cpp | 2 +- src/Controls/ofxSimpleGuiColorPicker.cpp | 2 +- src/Controls/ofxSimpleGuiComboBox.cpp | 2 +- src/Controls/ofxSimpleGuiContent.cpp | 2 +- src/Controls/ofxSimpleGuiFPSCounter.cpp | 2 +- src/Controls/ofxSimpleGuiQuadWarp.cpp | 4 ++-- src/Controls/ofxSimpleGuiSlider2d.cpp | 2 +- src/Controls/ofxSimpleGuiSliderBase.h | 2 +- src/Controls/ofxSimpleGuiTitle.cpp | 2 +- src/Controls/ofxSimpleGuiToggle.cpp | 2 +- src/ofxSimpleGuiControl.cpp | 4 ++-- src/ofxSimpleGuiPage.cpp | 2 +- src/ofxSimpleGuiToo.cpp | 26 ++++++++++++------------ 13 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/Controls/ofxSimpleGuiButton.cpp b/src/Controls/ofxSimpleGuiButton.cpp index 4514931..5b9a19d 100644 --- a/src/Controls/ofxSimpleGuiButton.cpp +++ b/src/Controls/ofxSimpleGuiButton.cpp @@ -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); diff --git a/src/Controls/ofxSimpleGuiColorPicker.cpp b/src/Controls/ofxSimpleGuiColorPicker.cpp index 4a737aa..10173d2 100644 --- a/src/Controls/ofxSimpleGuiColorPicker.cpp +++ b/src/Controls/ofxSimpleGuiColorPicker.cpp @@ -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); diff --git a/src/Controls/ofxSimpleGuiComboBox.cpp b/src/Controls/ofxSimpleGuiComboBox.cpp index 75a1089..2a4faa2 100644 --- a/src/Controls/ofxSimpleGuiComboBox.cpp +++ b/src/Controls/ofxSimpleGuiComboBox.cpp @@ -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); diff --git a/src/Controls/ofxSimpleGuiContent.cpp b/src/Controls/ofxSimpleGuiContent.cpp index 611e315..f8a2c0a 100755 --- a/src/Controls/ofxSimpleGuiContent.cpp +++ b/src/Controls/ofxSimpleGuiContent.cpp @@ -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(); diff --git a/src/Controls/ofxSimpleGuiFPSCounter.cpp b/src/Controls/ofxSimpleGuiFPSCounter.cpp index 890300c..d007841 100755 --- a/src/Controls/ofxSimpleGuiFPSCounter.cpp +++ b/src/Controls/ofxSimpleGuiFPSCounter.cpp @@ -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); diff --git a/src/Controls/ofxSimpleGuiQuadWarp.cpp b/src/Controls/ofxSimpleGuiQuadWarp.cpp index 864ae6b..7d6ed0d 100644 --- a/src/Controls/ofxSimpleGuiQuadWarp.cpp +++ b/src/Controls/ofxSimpleGuiQuadWarp.cpp @@ -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; @@ -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); diff --git a/src/Controls/ofxSimpleGuiSlider2d.cpp b/src/Controls/ofxSimpleGuiSlider2d.cpp index 86fb022..263df01 100644 --- a/src/Controls/ofxSimpleGuiSlider2d.cpp +++ b/src/Controls/ofxSimpleGuiSlider2d.cpp @@ -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); diff --git a/src/Controls/ofxSimpleGuiSliderBase.h b/src/Controls/ofxSimpleGuiSliderBase.h index 7430239..4cd2999 100644 --- a/src/Controls/ofxSimpleGuiSliderBase.h +++ b/src/Controls/ofxSimpleGuiSliderBase.h @@ -163,7 +163,7 @@ template 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); diff --git a/src/Controls/ofxSimpleGuiTitle.cpp b/src/Controls/ofxSimpleGuiTitle.cpp index bf0f798..44ba986 100644 --- a/src/Controls/ofxSimpleGuiTitle.cpp +++ b/src/Controls/ofxSimpleGuiTitle.cpp @@ -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; diff --git a/src/Controls/ofxSimpleGuiToggle.cpp b/src/Controls/ofxSimpleGuiToggle.cpp index 68353d2..7f5351a 100644 --- a/src/Controls/ofxSimpleGuiToggle.cpp +++ b/src/Controls/ofxSimpleGuiToggle.cpp @@ -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); diff --git a/src/ofxSimpleGuiControl.cpp b/src/ofxSimpleGuiControl.cpp index 657efa7..7b55800 100644 --- a/src/ofxSimpleGuiControl.cpp +++ b/src/ofxSimpleGuiControl.cpp @@ -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; @@ -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; diff --git a/src/ofxSimpleGuiPage.cpp b/src/ofxSimpleGuiPage.cpp index 0f81e51..b08e8fb 100644 --- a/src/ofxSimpleGuiPage.cpp +++ b/src/ofxSimpleGuiPage.cpp @@ -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; diff --git a/src/ofxSimpleGuiToo.cpp b/src/ofxSimpleGuiToo.cpp index 50e6465..9c46575 100644 --- a/src/ofxSimpleGuiToo.cpp +++ b/src/ofxSimpleGuiToo.cpp @@ -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) {