Permalink
Browse files

fixed examples to work with updates

  • Loading branch information...
1 parent cbe2749 commit f29a7d7874141fafef65d891e0a8bc10921a15dd @rezaali committed Sep 8, 2012
@@ -36,11 +36,11 @@ void testApp::setup()
radio->activateToggle("SOCKS");
gui->addSpacer(length-xInit, 2);
- gui->addWidgetDown(new ofxUILabelButton(false, "LABEL BUTTON", OFX_UI_FONT_MEDIUM));
+ gui->addLabelButton("LABEL BUTTON", false);
gui->addWidgetEastOf(new ofxUILabel("<- Automagically Sized", OFX_UI_FONT_SMALL),"LABEL BUTTON");
- gui->addWidgetSouthOf(new ofxUILabelButton(length-xInit, false, "SPECIFIED WIDTH BUTTON", OFX_UI_FONT_MEDIUM), "LABEL BUTTON");
- gui->addWidgetDown(new ofxUILabelToggle(false, "LABEL TOGGLE", OFX_UI_FONT_MEDIUM));
- gui->addWidgetDown(new ofxUILabelToggle(length-xInit, false, "SPECIFIED WIDTH TOGGLE", OFX_UI_FONT_MEDIUM));
+ gui->addWidgetSouthOf(new ofxUILabelButton(length-xInit, false, "SPECIFIED WIDTH BUTTON", OFX_UI_FONT_MEDIUM), "LABEL BUTTON");
+ gui->addLabelToggle("LABEL TOGGLE", false);
+ gui->addLabelToggle("SPECIFIED WIDTH TOGGLE", false, length-xInit);
gui->addSpacer(length-xInit, 2);
gui->addWidgetDown(new ofxUIToggleMatrix(dim, dim, 3, 3, "3X3 MATRIX"));
@@ -1,75 +1,75 @@
-<Widget>
- <Kind>8</Kind>
- <Name>NDIALER</Name>
- <Value>100</Value>
-</Widget>
-<Widget>
- <Kind>12</Kind>
- <Name>Text Input Large</Name>
- <Value>LARGE TEXT FIELD</Value>
-</Widget>
-<Widget>
- <Kind>12</Kind>
- <Name>Text Input Medium</Name>
- <Value>MEDIUM TEXT FIELD</Value>
-</Widget>
-<Widget>
- <Kind>12</Kind>
- <Name>Text Input Small</Name>
- <Value>SMALL TEXT FIELD</Value>
-</Widget>
-<Widget>
- <Kind>12</Kind>
- <Name>Text Input Autoclear</Name>
- <Value>Auto Clear Disabled</Value>
-</Widget>
-<Widget>
- <Kind>28</Kind>
- <Name>OF LOGO 2</Name>
- <XValue>0.5</XValue>
- <YValue>0.5</YValue>
- <RColor>188</RColor>
- <GColor>152</GColor>
- <BColor>116</BColor>
- <AColor>255</AColor>
-</Widget>
-<Widget>
- <Kind>17</Kind>
- <Name>FIRST ITEM</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>17</Kind>
- <Name>SECOND ITEM</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>17</Kind>
- <Name>THIRD ITEM</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>17</Kind>
- <Name>FOURTH ITEM</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>17</Kind>
- <Name>FIFTH ITEM</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>17</Kind>
- <Name>SIXTH ITEM</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>17</Kind>
- <Name>SEVENTH ITEM</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>17</Kind>
- <Name>EIGTHTH ITEM</Name>
- <Value>0</Value>
-</Widget>
+<Widget>
+ <Kind>8</Kind>
+ <Name>NDIALER</Name>
+ <Value>100</Value>
+</Widget>
+<Widget>
+ <Kind>12</Kind>
+ <Name>Text Input Large</Name>
+ <Value>LARGE TEXT FIELD</Value>
+</Widget>
+<Widget>
+ <Kind>12</Kind>
+ <Name>Text Input Medium</Name>
+ <Value>MEDIUM TEXT FIELD</Value>
+</Widget>
+<Widget>
+ <Kind>12</Kind>
+ <Name>Text Input Small</Name>
+ <Value>SMALL TEXT FIELD</Value>
+</Widget>
+<Widget>
+ <Kind>12</Kind>
+ <Name>Text Input Autoclear</Name>
+ <Value>Auto Clear Disabled</Value>
+</Widget>
+<Widget>
+ <Kind>28</Kind>
+ <Name>OF LOGO 2</Name>
+ <XValue>0.5</XValue>
+ <YValue>0.5</YValue>
+ <RColor>188</RColor>
+ <GColor>152</GColor>
+ <BColor>116</BColor>
+ <AColor>255</AColor>
+</Widget>
+<Widget>
+ <Kind>17</Kind>
+ <Name>FIRST ITEM</Name>
+ <Value>0</Value>
+</Widget>
+<Widget>
+ <Kind>17</Kind>
+ <Name>SECOND ITEM</Name>
+ <Value>0</Value>
+</Widget>
+<Widget>
+ <Kind>17</Kind>
+ <Name>THIRD ITEM</Name>
+ <Value>1</Value>
+</Widget>
+<Widget>
+ <Kind>17</Kind>
+ <Name>FOURTH ITEM</Name>
+ <Value>0</Value>
+</Widget>
+<Widget>
+ <Kind>17</Kind>
+ <Name>FIFTH ITEM</Name>
+ <Value>0</Value>
+</Widget>
+<Widget>
+ <Kind>17</Kind>
+ <Name>SIXTH ITEM</Name>
+ <Value>1</Value>
+</Widget>
+<Widget>
+ <Kind>17</Kind>
+ <Name>SEVENTH ITEM</Name>
+ <Value>0</Value>
+</Widget>
+<Widget>
+ <Kind>17</Kind>
+ <Name>EIGTHTH ITEM</Name>
+ <Value>0</Value>
+</Widget>
@@ -65,9 +65,12 @@ void testApp::setup()
vector<string> items; items.push_back("FIRST ITEM"); items.push_back("SECOND ITEM"); items.push_back("THIRD ITEM"); items.push_back("FOURTH ITEM");
vector<string> items2; items2.push_back("FIFTH ITEM"); items2.push_back("SIXTH ITEM"); items2.push_back("SEVENTH ITEM"); items2.push_back("EIGTHTH ITEM");
- gui->addWidgetDown(new ofxUIDropDownList("DROP DOWN", items, OFX_UI_FONT_MEDIUM));
- gui->addWidgetRight(new ofxUIDropDownList("ALLOW MULTIPLE", items2, OFX_UI_FONT_MEDIUM));
+ gui->addDropDownList("DROP DOWN", items);
+ gui->setWidgetPosition(OFX_UI_WIDGET_POSITION_RIGHT);
+ gui->addDropDownList("ALLOW MULTIPLE", items2);
+ gui->setWidgetPosition(OFX_UI_WIDGET_POSITION_DOWN);
+
ofxUIDropDownList* ddl = (ofxUIDropDownList *) gui->getWidget("ALLOW MULTIPLE");
ddl->setAllowMultiple(true);
@@ -1,107 +1,107 @@
-<Widget>
- <Kind>4</Kind>
- <Name>RED</Name>
- <Value>225.126</Value>
-</Widget>
-<Widget>
- <Kind>4</Kind>
- <Name>GREEN</Name>
- <Value>8.53556</Value>
-</Widget>
-<Widget>
- <Kind>4</Kind>
- <Name>BLUE</Name>
- <Value>52.2803</Value>
-</Widget>
-<Widget>
- <Kind>5</Kind>
- <Name>0</Name>
- <Value>150</Value>
-</Widget>
-<Widget>
- <Kind>5</Kind>
- <Name>1</Name>
- <Value>150</Value>
-</Widget>
-<Widget>
- <Kind>5</Kind>
- <Name>2</Name>
- <Value>150</Value>
-</Widget>
-<Widget>
- <Kind>5</Kind>
- <Name>3</Name>
- <Value>150</Value>
-</Widget>
-<Widget>
- <Kind>5</Kind>
- <Name>4</Name>
- <Value>150</Value>
-</Widget>
-<Widget>
- <Kind>5</Kind>
- <Name>5</Name>
- <Value>150</Value>
-</Widget>
-<Widget>
- <Kind>5</Kind>
- <Name>6</Name>
- <Value>150</Value>
-</Widget>
-<Widget>
- <Kind>5</Kind>
- <Name>7</Name>
- <Value>150</Value>
-</Widget>
-<Widget>
- <Kind>5</Kind>
- <Name>8</Name>
- <Value>150</Value>
-</Widget>
-<Widget>
- <Kind>2</Kind>
- <Name>RAD1</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>2</Kind>
- <Name>RAD2</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>2</Kind>
- <Name>RAD3</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>2</Kind>
- <Name>RAD4</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>2</Kind>
- <Name>RAD5</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>2</Kind>
- <Name>RAD6</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>2</Kind>
- <Name>D_GRID</Name>
- <Value>0</Value>
-</Widget>
-<Widget>
- <Kind>6</Kind>
- <Name>RSLIDER</Name>
- <HighValue>210.188</HighValue>
- <LowValue>50</LowValue>
-</Widget>
-<Widget>
- <Kind>11</Kind>
- <Name>PAD</Name>
- <XValue>5</XValue>
- <YValue>90</YValue>
-</Widget>
+<Widget>
+ <Kind>4</Kind>
+ <Name>RED</Name>
+ <Value>225.126</Value>
+</Widget>
+<Widget>
+ <Kind>4</Kind>
+ <Name>GREEN</Name>
+ <Value>8.53556</Value>
+</Widget>
+<Widget>
+ <Kind>4</Kind>
+ <Name>BLUE</Name>
+ <Value>52.2803</Value>
+</Widget>
+<Widget>
+ <Kind>5</Kind>
+ <Name>0</Name>
+ <Value>150</Value>
+</Widget>
+<Widget>
+ <Kind>5</Kind>
+ <Name>1</Name>
+ <Value>150</Value>
+</Widget>
+<Widget>
+ <Kind>5</Kind>
+ <Name>2</Name>
+ <Value>150</Value>
+</Widget>
+<Widget>
+ <Kind>5</Kind>
+ <Name>3</Name>
+ <Value>150</Value>
+</Widget>
+<Widget>
+ <Kind>5</Kind>
+ <Name>4</Name>
+ <Value>150</Value>
+</Widget>
+<Widget>
+ <Kind>5</Kind>
+ <Name>5</Name>
+ <Value>150</Value>
+</Widget>
+<Widget>
+ <Kind>5</Kind>
+ <Name>6</Name>
+ <Value>150</Value>
+</Widget>
+<Widget>
+ <Kind>5</Kind>
+ <Name>7</Name>
+ <Value>150</Value>
+</Widget>
+<Widget>
+ <Kind>5</Kind>
+ <Name>8</Name>
+ <Value>150</Value>
+</Widget>
+<Widget>
+ <Kind>2</Kind>
+ <Name>RAD1</Name>
+ <Value>0</Value>
+</Widget>
+<Widget>
+ <Kind>2</Kind>
+ <Name>RAD2</Name>
+ <Value>0</Value>
+</Widget>
+<Widget>
+ <Kind>2</Kind>
+ <Name>RAD3</Name>
+ <Value>0</Value>
+</Widget>
+<Widget>
+ <Kind>2</Kind>
+ <Name>RAD4</Name>
+ <Value>0</Value>
+</Widget>
+<Widget>
+ <Kind>2</Kind>
+ <Name>RAD5</Name>
+ <Value>0</Value>
+</Widget>
+<Widget>
+ <Kind>2</Kind>
+ <Name>RAD6</Name>
+ <Value>0</Value>
+</Widget>
+<Widget>
+ <Kind>2</Kind>
+ <Name>D_GRID</Name>
+ <Value>0</Value>
+</Widget>
+<Widget>
+ <Kind>6</Kind>
+ <Name>RSLIDER</Name>
+ <HighValue>210.188</HighValue>
+ <LowValue>50</LowValue>
+</Widget>
+<Widget>
+ <Kind>11</Kind>
+ <Name>PAD</Name>
+ <XValue>5</XValue>
+ <YValue>90</YValue>
+</Widget>
Oops, something went wrong.

0 comments on commit f29a7d7

Please sign in to comment.