Skip to content
Browse files

fixed ofxUIMultiImageButton and Toggle from crashing upon creation an…

…d updated them for variable binding
  • Loading branch information...
1 parent 5ae87c6 commit ddb61d0a17181a4b4eca45d8eef052ccaef51d3a @rezaali rezaali committed Aug 7, 2012
View
BIN example-ofxUIAllWidgets/bin/data/GUI/toggle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN example-ofxUIAllWidgets/bin/data/GUI/toggledown.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN example-ofxUIAllWidgets/bin/data/GUI/toggleon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN example-ofxUIAllWidgets/bin/data/GUI/toggleover.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
168 example-ofxUIAllWidgets/ofxUIAllWidgets.xcodeproj/project.pbxproj
@@ -61,6 +61,45 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 46A6CD4715D111C500BD4287 /* ofxUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUI.h; sourceTree = "<group>"; };
+ 46A6CD4815D111C500BD4287 /* ofxUI2DPad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUI2DPad.h; sourceTree = "<group>"; };
+ 46A6CD4915D111C500BD4287 /* ofxUIBiLabelSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIBiLabelSlider.h; sourceTree = "<group>"; };
+ 46A6CD4A15D111C500BD4287 /* ofxUIButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIButton.h; sourceTree = "<group>"; };
+ 46A6CD4B15D111C500BD4287 /* ofxUICanvas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUICanvas.h; sourceTree = "<group>"; };
+ 46A6CD4C15D111C500BD4287 /* ofxUICircleSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUICircleSlider.h; sourceTree = "<group>"; };
+ 46A6CD4D15D111C500BD4287 /* ofxUICustomImageButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUICustomImageButton.h; sourceTree = "<group>"; };
+ 46A6CD4E15D111C500BD4287 /* ofxUIDropDownList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIDropDownList.h; sourceTree = "<group>"; };
+ 46A6CD4F15D111C500BD4287 /* ofxUIEventArgs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIEventArgs.h; sourceTree = "<group>"; };
+ 46A6CD5015D111C500BD4287 /* ofxUIFPS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIFPS.h; sourceTree = "<group>"; };
+ 46A6CD5115D111C500BD4287 /* ofxUIFPSSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIFPSSlider.h; sourceTree = "<group>"; };
+ 46A6CD5215D111C500BD4287 /* ofxUIImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIImage.h; sourceTree = "<group>"; };
+ 46A6CD5315D111C500BD4287 /* ofxUIImageButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIImageButton.h; sourceTree = "<group>"; };
+ 46A6CD5415D111C500BD4287 /* ofxUIImageSampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIImageSampler.h; sourceTree = "<group>"; };
+ 46A6CD5515D111C500BD4287 /* ofxUIImageSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIImageSlider.h; sourceTree = "<group>"; };
+ 46A6CD5615D111C500BD4287 /* ofxUIImageToggle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIImageToggle.h; sourceTree = "<group>"; };
+ 46A6CD5715D111C500BD4287 /* ofxUILabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUILabel.h; sourceTree = "<group>"; };
+ 46A6CD5815D111C500BD4287 /* ofxUILabelButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUILabelButton.h; sourceTree = "<group>"; };
+ 46A6CD5915D111C500BD4287 /* ofxUILabelToggle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUILabelToggle.h; sourceTree = "<group>"; };
+ 46A6CD5A15D111C500BD4287 /* ofxUIMinimalSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIMinimalSlider.h; sourceTree = "<group>"; };
+ 46A6CD5B15D111C500BD4287 /* ofxUIMovingGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIMovingGraph.h; sourceTree = "<group>"; };
+ 46A6CD5C15D111C500BD4287 /* ofxUIMultiImageButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIMultiImageButton.h; sourceTree = "<group>"; };
+ 46A6CD5D15D111C500BD4287 /* ofxUIMultiImageSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIMultiImageSlider.h; sourceTree = "<group>"; };
+ 46A6CD5E15D111C500BD4287 /* ofxUIMultiImageToggle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIMultiImageToggle.h; sourceTree = "<group>"; };
+ 46A6CD5F15D111C500BD4287 /* ofxUINumberDialer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUINumberDialer.h; sourceTree = "<group>"; };
+ 46A6CD6015D111C500BD4287 /* ofxUIRadio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIRadio.h; sourceTree = "<group>"; };
+ 46A6CD6115D111C500BD4287 /* ofxUIRangeSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIRangeSlider.h; sourceTree = "<group>"; };
+ 46A6CD6215D111C500BD4287 /* ofxUIRectangle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIRectangle.h; sourceTree = "<group>"; };
+ 46A6CD6315D111C500BD4287 /* ofxUIRotarySlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIRotarySlider.h; sourceTree = "<group>"; };
+ 46A6CD6415D111C500BD4287 /* ofxUIScrollableCanvas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIScrollableCanvas.h; sourceTree = "<group>"; };
+ 46A6CD6515D111C500BD4287 /* ofxUISlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUISlider.h; sourceTree = "<group>"; };
+ 46A6CD6615D111C500BD4287 /* ofxUISpacer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUISpacer.h; sourceTree = "<group>"; };
+ 46A6CD6715D111C500BD4287 /* ofxUISpectrum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUISpectrum.h; sourceTree = "<group>"; };
+ 46A6CD6815D111C500BD4287 /* ofxUITextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUITextInput.h; sourceTree = "<group>"; };
+ 46A6CD6915D111C500BD4287 /* ofxUIToggle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIToggle.h; sourceTree = "<group>"; };
+ 46A6CD6A15D111C500BD4287 /* ofxUIToggleMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIToggleMatrix.h; sourceTree = "<group>"; };
+ 46A6CD6B15D111C500BD4287 /* ofxUIWaveform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIWaveform.h; sourceTree = "<group>"; };
+ 46A6CD6C15D111C500BD4287 /* ofxUIWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIWidget.h; sourceTree = "<group>"; };
+ 46A6CD6D15D111C500BD4287 /* ofxUIWidgetWithLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIWidgetWithLabel.h; sourceTree = "<group>"; };
BBAB23BE13894E4700AA2426 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../libs/glut/lib/osx/GLUT.framework; sourceTree = "<group>"; };
E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; };
E45BE9710E8CC7DD009D7055 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
@@ -89,39 +128,6 @@
F51708B714E53B0900C15F2F /* tinyxmlparser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tinyxmlparser.cpp; sourceTree = "<group>"; };
F51708B914E53B0900C15F2F /* ofxXmlSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxXmlSettings.cpp; sourceTree = "<group>"; };
F51708BA14E53B0900C15F2F /* ofxXmlSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxXmlSettings.h; sourceTree = "<group>"; };
- F55D025A153EC7E500340848 /* ofxUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUI.h; sourceTree = "<group>"; };
- F55D025B153EC7E500340848 /* ofxUI2DPad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUI2DPad.h; sourceTree = "<group>"; };
- F55D025C153EC7E500340848 /* ofxUIBiLabelSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIBiLabelSlider.h; sourceTree = "<group>"; };
- F55D025D153EC7E500340848 /* ofxUIButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIButton.h; sourceTree = "<group>"; };
- F55D025E153EC7E500340848 /* ofxUICanvas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUICanvas.h; sourceTree = "<group>"; };
- F55D025F153EC7E500340848 /* ofxUICircleSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUICircleSlider.h; sourceTree = "<group>"; };
- F55D0260153EC7E500340848 /* ofxUIDropDownList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIDropDownList.h; sourceTree = "<group>"; };
- F55D0261153EC7E500340848 /* ofxUIEventArgs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIEventArgs.h; sourceTree = "<group>"; };
- F55D0262153EC7E500340848 /* ofxUIFPS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIFPS.h; sourceTree = "<group>"; };
- F55D0263153EC7E500340848 /* ofxUIFPSSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIFPSSlider.h; sourceTree = "<group>"; };
- F55D0264153EC7E500340848 /* ofxUIImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIImage.h; sourceTree = "<group>"; };
- F55D0265153EC7E500340848 /* ofxUIImageButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIImageButton.h; sourceTree = "<group>"; };
- F55D0266153EC7E500340848 /* ofxUIImageSampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIImageSampler.h; sourceTree = "<group>"; };
- F55D0267153EC7E500340848 /* ofxUIImageToggle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIImageToggle.h; sourceTree = "<group>"; };
- F55D0268153EC7E500340848 /* ofxUILabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUILabel.h; sourceTree = "<group>"; };
- F55D0269153EC7E500340848 /* ofxUILabelButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUILabelButton.h; sourceTree = "<group>"; };
- F55D026A153EC7E500340848 /* ofxUILabelToggle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUILabelToggle.h; sourceTree = "<group>"; };
- F55D026B153EC7E500340848 /* ofxUIMinimalSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIMinimalSlider.h; sourceTree = "<group>"; };
- F55D026C153EC7E500340848 /* ofxUIMovingGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIMovingGraph.h; sourceTree = "<group>"; };
- F55D026D153EC7E500340848 /* ofxUINumberDialer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUINumberDialer.h; sourceTree = "<group>"; };
- F55D026E153EC7E500340848 /* ofxUIRadio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIRadio.h; sourceTree = "<group>"; };
- F55D026F153EC7E500340848 /* ofxUIRangeSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIRangeSlider.h; sourceTree = "<group>"; };
- F55D0270153EC7E500340848 /* ofxUIRectangle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIRectangle.h; sourceTree = "<group>"; };
- F55D0271153EC7E500340848 /* ofxUIRotarySlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIRotarySlider.h; sourceTree = "<group>"; };
- F55D0272153EC7E500340848 /* ofxUIScrollableCanvas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIScrollableCanvas.h; sourceTree = "<group>"; };
- F55D0273153EC7E500340848 /* ofxUISlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUISlider.h; sourceTree = "<group>"; };
- F55D0274153EC7E500340848 /* ofxUISpacer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUISpacer.h; sourceTree = "<group>"; };
- F55D0275153EC7E500340848 /* ofxUISpectrum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUISpectrum.h; sourceTree = "<group>"; };
- F55D0276153EC7E500340848 /* ofxUITextInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUITextInput.h; sourceTree = "<group>"; };
- F55D0277153EC7E500340848 /* ofxUIToggle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIToggle.h; sourceTree = "<group>"; };
- F55D0278153EC7E500340848 /* ofxUIToggleMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIToggleMatrix.h; sourceTree = "<group>"; };
- F55D0279153EC7E500340848 /* ofxUIWaveform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIWaveform.h; sourceTree = "<group>"; };
- F55D027A153EC7E500340848 /* ofxUIWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxUIWidget.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -149,57 +155,57 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
- 4669357715BE905600F306CD /* Done */ = {
+ 46A6CD4615D111C500BD4287 /* ofxUI */ = {
isa = PBXGroup;
children = (
- F55D025C153EC7E500340848 /* ofxUIBiLabelSlider.h */,
- F55D025F153EC7E500340848 /* ofxUICircleSlider.h */,
- F55D0265153EC7E500340848 /* ofxUIImageButton.h */,
- F55D0267153EC7E500340848 /* ofxUIImageToggle.h */,
- F55D0269153EC7E500340848 /* ofxUILabelButton.h */,
- F55D026A153EC7E500340848 /* ofxUILabelToggle.h */,
- F55D026B153EC7E500340848 /* ofxUIMinimalSlider.h */,
- F55D026D153EC7E500340848 /* ofxUINumberDialer.h */,
- F55D026F153EC7E500340848 /* ofxUIRangeSlider.h */,
- F55D0271153EC7E500340848 /* ofxUIRotarySlider.h */,
- F55D0263153EC7E500340848 /* ofxUIFPSSlider.h */,
- F55D0278153EC7E500340848 /* ofxUIToggleMatrix.h */,
- F55D0277153EC7E500340848 /* ofxUIToggle.h */,
- F55D025D153EC7E500340848 /* ofxUIButton.h */,
- F55D0273153EC7E500340848 /* ofxUISlider.h */,
- F55D027A153EC7E500340848 /* ofxUIWidget.h */,
- F55D0279153EC7E500340848 /* ofxUIWaveform.h */,
- F55D0276153EC7E500340848 /* ofxUITextInput.h */,
- F55D0275153EC7E500340848 /* ofxUISpectrum.h */,
- F55D0274153EC7E500340848 /* ofxUISpacer.h */,
- F55D0272153EC7E500340848 /* ofxUIScrollableCanvas.h */,
- F55D0270153EC7E500340848 /* ofxUIRectangle.h */,
- F55D026E153EC7E500340848 /* ofxUIRadio.h */,
- F55D026C153EC7E500340848 /* ofxUIMovingGraph.h */,
- F55D0268153EC7E500340848 /* ofxUILabel.h */,
- F55D0266153EC7E500340848 /* ofxUIImageSampler.h */,
- F55D0264153EC7E500340848 /* ofxUIImage.h */,
- F55D0262153EC7E500340848 /* ofxUIFPS.h */,
- F55D0261153EC7E500340848 /* ofxUIEventArgs.h */,
- F55D0260153EC7E500340848 /* ofxUIDropDownList.h */,
- F55D025E153EC7E500340848 /* ofxUICanvas.h */,
- F55D025B153EC7E500340848 /* ofxUI2DPad.h */,
- F55D025A153EC7E500340848 /* ofxUI.h */,
+ 46A6CD4715D111C500BD4287 /* ofxUI.h */,
+ 46A6CD4815D111C500BD4287 /* ofxUI2DPad.h */,
+ 46A6CD4915D111C500BD4287 /* ofxUIBiLabelSlider.h */,
+ 46A6CD4A15D111C500BD4287 /* ofxUIButton.h */,
+ 46A6CD4B15D111C500BD4287 /* ofxUICanvas.h */,
+ 46A6CD4C15D111C500BD4287 /* ofxUICircleSlider.h */,
+ 46A6CD4D15D111C500BD4287 /* ofxUICustomImageButton.h */,
+ 46A6CD4E15D111C500BD4287 /* ofxUIDropDownList.h */,
+ 46A6CD4F15D111C500BD4287 /* ofxUIEventArgs.h */,
+ 46A6CD5015D111C500BD4287 /* ofxUIFPS.h */,
+ 46A6CD5115D111C500BD4287 /* ofxUIFPSSlider.h */,
+ 46A6CD5215D111C500BD4287 /* ofxUIImage.h */,
+ 46A6CD5315D111C500BD4287 /* ofxUIImageButton.h */,
+ 46A6CD5415D111C500BD4287 /* ofxUIImageSampler.h */,
+ 46A6CD5515D111C500BD4287 /* ofxUIImageSlider.h */,
+ 46A6CD5615D111C500BD4287 /* ofxUIImageToggle.h */,
+ 46A6CD5715D111C500BD4287 /* ofxUILabel.h */,
+ 46A6CD5815D111C500BD4287 /* ofxUILabelButton.h */,
+ 46A6CD5915D111C500BD4287 /* ofxUILabelToggle.h */,
+ 46A6CD5A15D111C500BD4287 /* ofxUIMinimalSlider.h */,
+ 46A6CD5B15D111C500BD4287 /* ofxUIMovingGraph.h */,
+ 46A6CD5C15D111C500BD4287 /* ofxUIMultiImageButton.h */,
+ 46A6CD5E15D111C500BD4287 /* ofxUIMultiImageToggle.h */,
+ 46A6CD5D15D111C500BD4287 /* ofxUIMultiImageSlider.h */,
+ 46A6CD5F15D111C500BD4287 /* ofxUINumberDialer.h */,
+ 46A6CD6015D111C500BD4287 /* ofxUIRadio.h */,
+ 46A6CD6115D111C500BD4287 /* ofxUIRangeSlider.h */,
+ 46A6CD6215D111C500BD4287 /* ofxUIRectangle.h */,
+ 46A6CD6315D111C500BD4287 /* ofxUIRotarySlider.h */,
+ 46A6CD6415D111C500BD4287 /* ofxUIScrollableCanvas.h */,
+ 46A6CD6515D111C500BD4287 /* ofxUISlider.h */,
+ 46A6CD6615D111C500BD4287 /* ofxUISpacer.h */,
+ 46A6CD6715D111C500BD4287 /* ofxUISpectrum.h */,
+ 46A6CD6815D111C500BD4287 /* ofxUITextInput.h */,
+ 46A6CD6915D111C500BD4287 /* ofxUIToggle.h */,
+ 46A6CD6A15D111C500BD4287 /* ofxUIToggleMatrix.h */,
+ 46A6CD6B15D111C500BD4287 /* ofxUIWaveform.h */,
+ 46A6CD6C15D111C500BD4287 /* ofxUIWidget.h */,
+ 46A6CD6D15D111C500BD4287 /* ofxUIWidgetWithLabel.h */,
);
- name = Done;
- sourceTree = "<group>";
- };
- 4669357815BE905C00F306CD /* Not Done */ = {
- isa = PBXGroup;
- children = (
- );
- name = "Not Done";
+ name = ofxUI;
+ path = ../src;
sourceTree = "<group>";
};
BB4B014C10F69532006C3DED /* addons */ = {
isa = PBXGroup;
children = (
- F55D0259153EC7E500340848 /* ofxUI */,
+ 46A6CD4615D111C500BD4287 /* ofxUI */,
F51708B114E53B0900C15F2F /* ofxXmlSettings */,
);
name = addons;
@@ -312,16 +318,6 @@
path = src;
sourceTree = "<group>";
};
- F55D0259153EC7E500340848 /* ofxUI */ = {
- isa = PBXGroup;
- children = (
- 4669357815BE905C00F306CD /* Not Done */,
- 4669357715BE905600F306CD /* Done */,
- );
- name = ofxUI;
- path = ../src;
- sourceTree = "<group>";
- };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
View
21 example-ofxUIAllWidgets/src/testApp.cpp
@@ -291,15 +291,15 @@ void testApp::setGUI1()
gui1->addSpacer(length-xInit, 2);
gui1->addWidgetDown(new ofxUILabel("V SLIDERS", OFX_UI_FONT_MEDIUM));
- gui1->addWidgetDown(new ofxUISlider(dim,160, 0.0, 255.0, 150, "0"));
- gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150, "1"));
- gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150, "2"));
- gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150, "3"));
- gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150, "4"));
- gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150, "5"));
- gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150, "6"));
- gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150, "7"));
- gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150, "8"));
+ gui1->addWidgetDown(new ofxUISlider(dim,160, 0.0, 255.0, 150.0, "0"));
+ gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150.0, "1"));
+ gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150.0, "2"));
+ gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150.0, "3"));
+ gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150.0, "4"));
+ gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150.0, "5"));
+ gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150.0, "6"));
+ gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150.0, "7"));
+ gui1->addWidgetRight(new ofxUISlider(dim,160, 0.0, 255.0, 150.0, "8"));
gui1->addSpacer(length-xInit, 2);
gui1->addWidgetDown(new ofxUIRadio( dim, dim, "RADIO HORIZONTAL", names, OFX_UI_ORIENTATION_HORIZONTAL));
@@ -453,7 +453,8 @@ void testApp::setGUI4()
gui4->addSpacer(length-xInit, 2);
gui4->addWidgetDown(new ofxUILabel("IMAGE SAMPLER", OFX_UI_FONT_MEDIUM));
gui4->addWidgetDown(new ofxUIImageSampler(img->getWidth(), img->getHeight(), img, "SAMPLER"));
-
+ gui4->addWidgetDown(new ofxUIMultiImageButton(dim*2, dim*2, false, "GUI/toggle.png", "IMAGE BUTTON"));
+ gui4->addWidgetDown(new ofxUIMultiImageToggle(dim*2, dim*2, false, "GUI/toggle.png", "IMAGE BUTTON"));
ofAddListener(gui4->newGUIEvent,this,&testApp::guiEvent);
View
27 example-ofxUICompactSyntax/bin/data/GUI/guiSettings.xml
@@ -1,47 +1,52 @@
<Widget>
<Kind>4</Kind>
+ <Name>FPS SLIDER</Name>
+ <Value>60.0643</Value>
+</Widget>
+<Widget>
+ <Kind>4</Kind>
<Name>BGR</Name>
- <Value>147.632</Value>
+ <Value>195.947</Value>
</Widget>
<Widget>
<Kind>4</Kind>
<Name>BGG</Name>
- <Value>174.474</Value>
+ <Value>204</Value>
</Widget>
<Widget>
<Kind>4</Kind>
<Name>BGB</Name>
- <Value>110.053</Value>
+ <Value>42.9474</Value>
</Widget>
<Widget>
<Kind>4</Kind>
<Name>RED</Name>
- <Value>178.173</Value>
+ <Value>233</Value>
</Widget>
<Widget>
<Kind>4</Kind>
<Name>GREEN</Name>
- <Value>178.173</Value>
+ <Value>52</Value>
</Widget>
<Widget>
<Kind>4</Kind>
<Name>BLUE</Name>
- <Value>8.17308</Value>
+ <Value>240</Value>
</Widget>
<Widget>
<Kind>4</Kind>
<Name>ALPHA</Name>
- <Value>245.627</Value>
+ <Value>200</Value>
</Widget>
<Widget>
<Kind>4</Kind>
<Name>RADIUS</Name>
- <Value>579.169</Value>
+ <Value>150</Value>
</Widget>
<Widget>
<Kind>4</Kind>
<Name>RESOLUTION</Name>
- <Value>5</Value>
+ <Value>30</Value>
</Widget>
<Widget>
<Kind>17</Kind>
@@ -51,6 +56,6 @@
<Widget>
<Kind>11</Kind>
<Name>POSITION</Name>
- <XValue>181</XValue>
- <YValue>175</YValue>
+ <XValue>258</XValue>
+ <YValue>167</YValue>
</Widget>
View
4 example-ofxUICompactSyntax/ofxUICompactSyntax.xcodeproj/project.pbxproj
@@ -82,7 +82,6 @@
E4C2424610CC5A17004149E2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CoreOF.xcconfig; path = ../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig; sourceTree = SOURCE_ROOT; };
E4EB6923138AFD0F00A09F29 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = "<group>"; };
- F517084214E5389000C15F2F /* install.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = install.xml; sourceTree = "<group>"; };
F517084414E5389000C15F2F /* tinyxml.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tinyxml.cpp; sourceTree = "<group>"; };
F517084514E5389000C15F2F /* tinyxml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tinyxml.h; sourceTree = "<group>"; };
F517084614E5389000C15F2F /* tinyxmlerror.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tinyxmlerror.cpp; sourceTree = "<group>"; };
@@ -232,9 +231,9 @@
children = (
F563EFB314C8B9F300354DA7 /* ofxUIWaveform.h */,
F563EFB014C8B9F300354DA7 /* ofxUISpectrum.h */,
- F563EFAA14C8B9F300354DA7 /* ofxUILabel.h */,
F563EFA914C8B9F300354DA7 /* ofxUIImage.h */,
F563EFA814C8B9F300354DA7 /* ofxUIFPS.h */,
+ F563EFAA14C8B9F300354DA7 /* ofxUILabel.h */,
F54B5D3714D299DF00B90DAE /* ofxUISpacer.h */,
);
name = Inactive;
@@ -265,7 +264,6 @@
F517084114E5389000C15F2F /* ofxXmlSettings */ = {
isa = PBXGroup;
children = (
- F517084214E5389000C15F2F /* install.xml */,
F517084314E5389000C15F2F /* libs */,
F517084814E5389000C15F2F /* src */,
);
View
46 example-ofxUICompactSyntax/src/testApp.cpp
@@ -23,27 +23,28 @@ void testApp::setup()
float xInit = OFX_UI_GLOBAL_WIDGET_SPACING;
float length = 320-xInit;
- gui = new ofxUICanvas(0,0,length+xInit*2.0,ofGetHeight());
- gui->addWidgetDown(new ofxUILabel("SIMPLE EXAMPLE", OFX_UI_FONT_LARGE));
-
+ gui = new ofxUICanvas(0,0,length+xInit*2.0,ofGetHeight());
+ gui->addLabel("COMPACT SYNTAX", OFX_UI_FONT_LARGE);
+ gui->addSpacer(length, 2);
+ gui->addLabel("BACKGROUND CONTROL");
+ gui->addSpacer(length, 2);
+ gui->addFPSSlider(length, dim, 0.0, 120.0, 60.0, "FPS SLIDER");
+ gui->addSpacer(length, 2);
+ gui->addSlider(95, dim, 0.0, 255.0, backgroundColor.r, "BGR");
+ gui->setWidgetPosition(OFX_UI_WIDGET_POSITION_RIGHT);
+ gui->addSlider(95, dim, 0.0, 255.0, backgroundColor.g, "BGG");
+ gui->addSlider(95, dim, 0.0, 255.0, backgroundColor.b, "BGB");
+ gui->setWidgetPosition(OFX_UI_WIDGET_POSITION_DOWN);
gui->addSpacer(length, 2);
- gui->addWidgetDown(new ofxUILabel("BACKGROUND CONTROL", OFX_UI_FONT_MEDIUM));
- gui->addWidgetDown(new ofxUISlider(95, dim, 0, 255, backgroundColor.r, "BGR"));
- gui->addWidgetRight(new ofxUISlider(95, dim, 0, 255, backgroundColor.g, "BGG"));
- gui->addWidgetRight(new ofxUISlider(95, dim, 0, 255, backgroundColor.b, "BGB"));
-
- gui->addSpacer(length, 2);
-
- gui->addWidgetDown(new ofxUILabel("CIRCLE CONTROL", OFX_UI_FONT_MEDIUM));
- gui->addWidgetDown(new ofxUISlider(length,dim, 0.0, 255.0, red, "RED"));
- gui->addWidgetDown(new ofxUISlider(length,dim, 0.0, 255.0, green, "GREEN"));
- gui->addWidgetDown(new ofxUISlider(length,dim, 0.0, 255.0, blue, "BLUE"));
- gui->addWidgetDown(new ofxUISlider(length,dim, 0.0, 255.0, alpha, "ALPHA"));
- gui->addWidgetDown(new ofxUISlider(length,dim, 0.0, 600.0, radius, "RADIUS"));
- gui->addWidgetDown(new ofxUISlider(length,dim, 3, 60, resolution, "RESOLUTION"));
-
- gui->addWidgetDown(new ofxUILabelToggle(drawFill, "DRAW FILL", OFX_UI_FONT_MEDIUM));
+ gui->addLabel("CIRCLE CONTROL");
+ gui->addSlider(length,dim, 0.0, 255.0, red, "RED");
+ gui->addSlider(length,dim, 0.0, 255.0, green, "GREEN");
+ gui->addSlider(length,dim, 0.0, 255.0, blue, "BLUE");
+ gui->addSlider(length,dim, 0.0, 255.0, alpha, "ALPHA");
+ gui->addSlider(length,dim, 0.0, 600.0, radius, "RADIUS");
+ gui->addSlider(length,dim, 3, 60, resolution, "RESOLUTION");
+ gui->addLabelToggle(length, drawFill, "DRAW FILL");
float padWidth = length;
float padHeight = length*((float)ofGetHeight()/(float)ofGetWidth());
@@ -52,9 +53,10 @@ void testApp::setup()
gui->addSpacer(length, 2);
- gui->addWidgetDown(new ofxUILabel("HIDE & SHOW GUI BY PRESSING 'g'", OFX_UI_FONT_MEDIUM));
- gui->addWidgetDown(new ofxUILabel("MOUSE OVER A SLIDER AND", OFX_UI_FONT_MEDIUM));
- gui->addWidgetDown(new ofxUILabel("PRESS UP, DOWN, LEFT, RIGHT", OFX_UI_FONT_MEDIUM));
+
+ gui->addLabel("HIDE & SHOW GUI BY PRESSING 'g'");
+ gui->addLabel("MOUSE OVER A SLIDER AND");
+ gui->addLabel("PRESS UP, DOWN, LEFT, RIGHT");
ofAddListener(gui->newGUIEvent,this,&testApp::guiEvent);
ofBackground(backgroundColor);
View
133 src/ofxUICanvas.h
@@ -108,7 +108,6 @@ class ofxUICanvas : public ofxUIWidget
widgetSpacing = OFX_UI_GLOBAL_WIDGET_SPACING;
hasKeyBoard = false;
- widgetFontSize = OFX_UI_FONT_MEDIUM;
widgetPosition = OFX_UI_WIDGET_POSITION_DOWN;
widgetAlign = OFX_UI_ALIGN_LEFT;
}
@@ -142,8 +141,7 @@ class ofxUICanvas : public ofxUIWidget
uniqueIDs = 0;
widgetSpacing = OFX_UI_GLOBAL_WIDGET_SPACING;
hasKeyBoard = false;
-
- widgetFontSize = OFX_UI_FONT_MEDIUM;
+
widgetPosition = OFX_UI_WIDGET_POSITION_DOWN;
widgetAlign = OFX_UI_ALIGN_LEFT;
}
@@ -1406,12 +1404,129 @@ class ofxUICanvas : public ofxUIWidget
return widget;
}
- ofxUISpacer* addSpacer(float w, float h, float x = 0, float y = 0)
+ ofxUISpacer* addSpacer(float w, float h)
+ {
+ ofxUISpacer* widget = new ofxUISpacer(w, h);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUISpacer* addSpacer(float w, float h, string name)
+ {
+ ofxUISpacer* widget = new ofxUISpacer(w, h, name);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUILabel *addLabel(string name, int size = OFX_UI_FONT_MEDIUM)
+ {
+ ofxUILabel* widget = new ofxUILabel(name, size);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUILabel *addLabel(string name, string label, int size = OFX_UI_FONT_MEDIUM)
+ {
+ ofxUILabel* widget = new ofxUILabel(name, label, size);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUIFPS *addFPS(int size = OFX_UI_FONT_MEDIUM)
+ {
+ ofxUIFPS* widget = new ofxUIFPS(size);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUIFPSSlider* addFPSSlider(float w, float h, float min, float max, float value, string name)
+ {
+ ofxUIFPSSlider* widget = new ofxUIFPSSlider(w, h, min, max, value, name);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUIFPSSlider* addFPSSlider(float w, float h, float min, float max, float *value, string name)
{
- ofxUISpacer* widget = new ofxUISpacer(w, h, x, y);
+ ofxUIFPSSlider* widget = new ofxUIFPSSlider(w, h, min, max, value, name);
addWidgetPosition(widget, widgetPosition, widgetAlign);
return widget;
}
+
+ ofxUISlider *addSlider(float w, float h, float min, float max, float value, string name)
+ {
+ ofxUISlider* widget = new ofxUISlider(w, h, min, max, value, name);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUISlider *addSlider(float w, float h, float min, float max, float *value, string name)
+ {
+ ofxUISlider* widget = new ofxUISlider(w, h, min, max, value, name);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUILabelToggle *addLabelToggle(bool value, string name, int size = OFX_UI_FONT_MEDIUM)
+ {
+ ofxUILabelToggle* widget = new ofxUILabelToggle(value, name, size);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUILabelToggle *addLabelToggle(bool *value, string name, int size = OFX_UI_FONT_MEDIUM)
+ {
+ ofxUILabelToggle* widget = new ofxUILabelToggle(value, name, size);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUILabelToggle *addLabelToggle(float w, bool value, string name, int size = OFX_UI_FONT_MEDIUM, float h = 0)
+ {
+ ofxUILabelToggle* widget = new ofxUILabelToggle(w, value, name, size, h);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUILabelToggle *addLabelToggle(float w, bool *value, string name, int size = OFX_UI_FONT_MEDIUM, float h = 0)
+ {
+ ofxUILabelToggle* widget = new ofxUILabelToggle(w, value, name, size, h);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUILabelButton *addLabelButton(bool value, string name, int size = OFX_UI_FONT_MEDIUM)
+ {
+ ofxUILabelButton* widget = new ofxUILabelButton(value, name, size);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUILabelButton *addLabelButton(bool *value, string name, int size = OFX_UI_FONT_MEDIUM)
+ {
+ ofxUILabelButton* widget = new ofxUILabelButton(value, name, size);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUILabelButton *addLabelButton(float w, bool value, string name, int size = OFX_UI_FONT_MEDIUM, float h = 0)
+ {
+ ofxUILabelButton* widget = new ofxUILabelButton(w, value, name, size, h);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+ ofxUILabelButton *addLabelButton(float w, bool *value, string name, int size = OFX_UI_FONT_MEDIUM, float h = 0)
+ {
+ ofxUILabelButton* widget = new ofxUILabelButton(w, value, name, size, h);
+ addWidgetPosition(widget, widgetPosition, widgetAlign);
+ return widget;
+ }
+
+
+
+
+
void resetPlacer()
{
lastAdded = NULL;
@@ -1437,12 +1552,7 @@ class ofxUICanvas : public ofxUIWidget
break;
}
}
-
- void setWidgetFontSize(int _size)
- {
- widgetFontSize = _size;
- }
-
+
void setWidgetPosition(ofxWidgetPosition _position, int _align = -1)
{
widgetPosition = _position;
@@ -2243,7 +2353,6 @@ class ofxUICanvas : public ofxUIWidget
string fontName;
- int widgetFontSize;
ofxWidgetPosition widgetPosition;
ofxWidgetAlignment widgetAlign;
View
39 src/ofxUIMultiImageButton.h
@@ -32,16 +32,31 @@ class ofxUIMultiImageButton : public ofxUIButton
public:
ofxUIMultiImageButton(float x, float y, float w, float h, bool _value, string _pathURL, string _name, int _size= OFX_UI_FONT_SMALL)
{
+ useReference = false;
rect = new ofxUIRectangle(x,y,w,h);
- init(w, h, _value, _pathURL, _name, _size);
+ init(w, h, &_value, _pathURL, _name, _size);
}
ofxUIMultiImageButton(float w, float h, bool _value, string _pathURL, string _name, int _size = OFX_UI_FONT_SMALL)
{
- rect = new ofxUIRectangle(0,0,w,h);
- init(w, h, _value, _pathURL, _name, _size);
- }
+ useReference = false;
+ rect = new ofxUIRectangle(0,0,w,h);
+ init(w, h, &_value, _pathURL, _name, _size);
+ }
+ ofxUIMultiImageButton(float x, float y, float w, float h, bool *_value, string _pathURL, string _name, int _size= OFX_UI_FONT_SMALL)
+ {
+ useReference = true;
+ rect = new ofxUIRectangle(x,y,w,h);
+ init(w, h, _value, _pathURL, _name, _size);
+ }
+
+ ofxUIMultiImageButton(float w, float h, bool *_value, string _pathURL, string _name, int _size = OFX_UI_FONT_SMALL)
+ {
+ useReference = true;
+ rect = new ofxUIRectangle(0,0,w,h);
+ init(w, h, _value, _pathURL, _name, _size);
+ }
~ofxUIMultiImageButton()
{
@@ -50,7 +65,7 @@ class ofxUIMultiImageButton : public ofxUIButton
delete on;
}
- void init(float w, float h, bool _value, string _pathURL, string _name, int _size = OFX_UI_FONT_SMALL)
+ void init(float w, float h, bool *_value, string _pathURL, string _name, int _size = OFX_UI_FONT_SMALL)
{
name = _name;
kind = OFX_UI_WIDGET_MULTIIMAGEBUTTON;
@@ -62,7 +77,19 @@ class ofxUIMultiImageButton : public ofxUIButton
label->setParent(label);
label->setRectParent(rect);
label->setEmbedded(true);
- setValue(_value);
+
+ if(useReference)
+ {
+ value = _value;
+ }
+ else
+ {
+ value = new bool();
+ *value = *_value;
+ }
+
+ setValue(*_value);
+
drawLabel = true;
label->setVisible(drawLabel);
View
38 src/ofxUIMultiImageToggle.h
@@ -32,16 +32,32 @@ class ofxUIMultiImageToggle : public ofxUIToggle
public:
ofxUIMultiImageToggle(float x, float y, float w, float h, bool _value, string _pathURL, string _name, int _size= OFX_UI_FONT_SMALL)
{
+ useReference = false;
rect = new ofxUIRectangle(x,y,w,h);
- init(w, h, _value, _pathURL, _name, _size);
+ init(w, h, &_value, _pathURL, _name, _size);
}
ofxUIMultiImageToggle(float w, float h, bool _value, string _pathURL, string _name, int _size = OFX_UI_FONT_SMALL)
{
- rect = new ofxUIRectangle(0,0,w,h);
- init(w, h, _value, _pathURL, _name, _size);
+ useReference = false;
+ rect = new ofxUIRectangle(0,0,w,h);
+ init(w, h, &_value, _pathURL, _name, _size);
}
+ ofxUIMultiImageToggle(float x, float y, float w, float h, bool *_value, string _pathURL, string _name, int _size= OFX_UI_FONT_SMALL)
+ {
+ useReference = true;
+ rect = new ofxUIRectangle(x,y,w,h);
+ init(w, h, _value, _pathURL, _name, _size);
+ }
+
+ ofxUIMultiImageToggle(float w, float h, bool *_value, string _pathURL, string _name, int _size = OFX_UI_FONT_SMALL)
+ {
+ useReference = true;
+ rect = new ofxUIRectangle(0,0,w,h);
+ init(w, h, _value, _pathURL, _name, _size);
+ }
+
~ofxUIMultiImageToggle()
{
@@ -51,7 +67,7 @@ class ofxUIMultiImageToggle : public ofxUIToggle
delete on;
}
- void init(float w, float h, bool _value, string _pathURL, string _name, int _size = OFX_UI_FONT_SMALL)
+ void init(float w, float h, bool *_value, string _pathURL, string _name, int _size = OFX_UI_FONT_SMALL)
{
name = _name;
kind = OFX_UI_WIDGET_MULTIIMAGETOGGLE;
@@ -63,7 +79,19 @@ class ofxUIMultiImageToggle : public ofxUIToggle
label->setParent(label);
label->setRectParent(rect);
label->setEmbedded(true);
- setValue(_value);
+
+ if(useReference)
+ {
+ value = _value;
+ }
+ else
+ {
+ value = new bool();
+ *value = *_value;
+ }
+
+ setValue(*_value);
+
drawLabel = true;
label->setVisible(drawLabel);
View
3 src/ofxUIRangeSlider.h
@@ -126,7 +126,8 @@ class ofxUIRangeSlider : public ofxUIWidgetWithLabel
valuelow = ofMap(valuelow, min, max, 0.0, 1.0, true);
valuehigh = ofMap(valuehigh, min, max, 0.0, 1.0, true);
-
+ labelPrecision = 2;
+
if(kind == OFX_UI_WIDGET_RSLIDER_H)
{
label = new ofxUILabel(0,h+padding,(name+" LABEL"), (name + ": " + ofToString(getScaledValueLow(),labelPrecision) + " " + ofToString(getScaledValueHigh(),labelPrecision)), _size);
View
41 src/ofxUISpacer.h
@@ -5,27 +5,42 @@
class ofxUISpacer : public ofxUIWidget
{
-public:
- ofxUISpacer(float w, float h, float x = 0, float y = 0)
+public:
+ ofxUISpacer(float x, float y, float w, float h)
{
- init(w, h, x, y);
+ init(x, y, w, h);
}
- ofxUISpacer* init(float w, float h, float x = 0, float y = 0)
+ ofxUISpacer(float x, float y, float w, float h, string _name)
{
- rect = new ofxUIRectangle(x,y,w,h);
- name = "OFX_UI_SPACER";
- kind = OFX_UI_WIDGET_SPACER;
+ init(x, y, w, h);
+ name = _name;
+ }
+
+ ofxUISpacer(float w, float h)
+ {
+ init(0, 0, w, h);
+ }
+
+ ofxUISpacer(float w, float h, string _name)
+ {
+ init(0, 0, w, h);
+ name = _name;
+ }
+
+ void init(float x, float y, float w, float h)
+ {
+ rect = new ofxUIRectangle(x,y,w,h);
+ name = "OFX_UI_SPACER";
+ kind = OFX_UI_WIDGET_SPACER;
paddedRect = new ofxUIRectangle(-padding, -padding, w+padding*2.0, h+padding*2.0);
- paddedRect->setParent(rect);
+ paddedRect->setParent(rect);
- draw_fill = true;
- draw_back = false;
-
- return this;
+ draw_fill = true;
+ draw_back = false;
}
-
+
void setParent(ofxUIWidget *_parent)
{
parent = _parent;

0 comments on commit ddb61d0

Please sign in to comment.
Something went wrong with that request. Please try again.