Perl 6 - the future is here, just unevenly distributed

IRC log for #openframeworks, 2017-07-15

| Channels | #openframeworks index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:11 mh__ joined #openframeworks
01:49 ilbot3 joined #openframeworks
01:49 Topic for #openframeworks is now Welcome :) Site: http://openframeworks.cc/ Logs: http://irclog.perlgeek.de/openframeworks/
04:34 TomK joined #openframeworks
05:55 meandi_2 joined #openframeworks
09:30 mh_ joined #openframeworks
16:21 GvP_ joined #openframeworks
19:05 pyrootpy joined #openframeworks
19:16 Beliq joined #openframeworks
19:50 mh__ joined #openframeworks
20:09 pyrootpy hi, i do have a bug here . I was trying to make some GUI (float sliders) though i had written
20:09 pyrootpy gui.setup( "Parameters", "settings.xml" );
20:09 pyrootpy gui.add( countX.setup( "countX", 50, 0, 200 ) );
20:09 pyrootpy gui.add( stepX.setup( "stepX", 20, 0, 200 ) );
20:09 pyrootpy gui.add( twistX.setup( "twistX", 5, -45, 45 ) );
20:10 pyrootpy but the gui does not have the "parameters" heading
20:10 pyrootpy can any body suggest me how to solve this out
20:18 Beliq y0 pyrootpy i just reply to you, cuz that's the first time i saw somebody active here xD
20:19 Beliq pyrootpy what do you mean heading? you don't have text element, gui doesn't add labels automatically
20:29 pyrootpy i am very new to openframeworks can u please help me
20:29 pyrootpy how do i add an ext element
20:31 pyrootpy i did added required codes in ofApp.ccp and ofApp.h
20:32 Beliq for text you can add in draw() something like ofDrawBitmapString("whatever-text")
20:32 Beliq here is an example of what i do
20:32 Beliq value = rms;
20:32 Beliq string strValue = "RMS: " + ofToString(value, 2);
20:32 Beliq ofDrawBitmapString(strValue, xpos, ypos);
20:33 Beliq that would pass variable to the string, which you make as a bitmap text
20:33 Beliq more easily you can just do ofDrawBitmapString("Sometext", 100, 10); just adjust manually where you need it
20:34 pyrootpy i added a GUI panel
20:35 pyrootpy now i want to put a heading to my panel's header
20:36 Beliq Can you show me screenshot? ofxGUI ? I'm not sure if does that
20:36 pyrootpy am using a ofxGui addon
20:36 pyrootpy the sliders are ok
20:36 Beliq and you just need text on top of the gui group
20:36 pyrootpy yo
20:37 mh_ joined #openframeworks
20:38 Beliq pyrootpy if you show me your code maybe i can help you better
20:39 pyrootpy oid ofApp::setup(){
20:39 pyrootpy ofSetWindowTitle("Video synth");
20:39 pyrootpy ofSetWindowShape(1280, 720);
20:39 pyrootpy ofSetFrameRate(60);
20:39 pyrootpy ofBackground(ofColor::white);
20:39 pyrootpy //ofSetFullscreen(true);
20:39 pyrootpy showGui = true;
20:39 pyrootpy
20:39 pyrootpy //---------------for the independent sliders---------------
20:39 pyrootpy gui.setup( "Parameters", "settings.xml" );
20:39 pyrootpy gui.add( countX.setup( "countX", 50, 0, 200 ) );
20:39 pyrootpy gui.add( stepX.setup( "stepX", 20, 0, 200 ) );
20:39 pyrootpy gui.add( twistX.setup( "twistX", 5, -45, 45 ) );
20:39 pyrootpy
20:39 pyrootpy //---------------matrix pattern--------------------
20:39 pyrootpy gui.add(countY.setup( "countY", 0, 0, 50));
20:39 pyrootpy gui.add(stepY.setup("stepY", 20, 0, 200));
20:39 pyrootpy gui.add(twistY.setup("twistY", 0, -30, 30));
20:39 pyrootpy gui.add(pinchY.setup("pinchY", 0, 0, 1));
20:39 pyrootpy
20:39 pyrootpy //------------------grouped sliders----------------------
20:39 pyrootpy globalGroup.setup( "Global" );
20:39 pyrootpy globalGroup.add( Scale.setup ( "Scale", 1, 0.0, 1));
20:39 pyrootpy globalGroup.add( Rotate.setup ( "Rotate", 0, -180, 180));
20:39 pyrootpy globalGroup.add( Background.setup( "Background", 255, 0, 255));
20:39 pyrootpy gui.add( &globalGroup);
20:40 pyrootpy
20:40 pyrootpy //------------more controls------------------
20:40 pyrootpy primGroup.setup( "Primitive");
20:40 pyrootpy primGroup.add( shiftY.setup("shiftY", 0.0, -1000.0, 1000.0));
20:40 pyrootpy primGroup.add( rotate.setup("rotate", 0.0, -18.0, 180.0));
20:40 pyrootpy primGroup.add( size.setup("size",
20:40 pyrootpy ofVec2f(6, 6),
20:40 pyrootpy ofVec2f(0, 0),
20:40 pyrootpy ofVec2f(20, 20)));
20:40 pyrootpy primGroup.add(color.setup("color",
20:40 pyrootpy ofColor::black,
20:40 pyrootpy ofColor(0, 0, 0, 0),
20:40 pyrootpy ofColor::white));
20:40 pyrootpy primGroup.add( filled.setup("filled", false));
20:40 pyrootpy primGroup.add(type.setup("type",false));
20:40 pyrootpy gui.add( &primGroup);
20:40 pyrootpy
20:40 pyrootpy this is what i had written
20:40 pyrootpy in ofApp.cpp
20:58 groolot joined #openframeworks
20:59 Beliq pyrootpy did u figure it out ?
21:05 Beliq pyrootpy i don't think you get a title for parameters by default, not sure how do it either
21:06 pyrootpy Beliq : am trying to figure that out
21:06 Beliq the title which i think you mean are for the folding of the gui
21:08 pyrootpy its important for the dropdown menus
21:08 pyrootpy atleast for me
21:08 Beliq yeah, don't you have it on dropdowns ?
21:09 Beliq http://imgur.com/a/tt2wj i though you need something like that "Parameters" added on top
21:12 pyrootpy no the group doesnt have it
21:13 Beliq so the primGroup has it and the global doesn't?
21:16 pyrootpy its missing from gui.setup & globalGroup.setup also the primGroup.setup
21:16 pyrootpy the main headings are missing
21:16 pyrootpy Parametes , global and primitive
21:16 Beliq you're not getting it for gui setup as far as i know
21:16 pyrootpy yup
21:17 mh__ joined #openframeworks
21:19 pyrootpy this is what am getting
21:19 pyrootpy https://ibb.co/cpHYQF
21:19 pyrootpy will that help
21:34 Beliq pyrootpy if you past the .h part i can run it now and see
21:35 pyrootpy #pragma once
21:35 pyrootpy #include "ofMain.h"
21:35 pyrootpy #include "ofxGui.h"
21:35 pyrootpy class ofApp : public ofBaseApp{
21:35 pyrootpy public:
21:35 pyrootpy void setup();
21:35 pyrootpy void update();
21:35 pyrootpy void draw();
21:35 pyrootpy void stripePattern();
21:35 pyrootpy
21:35 pyrootpy void keyPressed(int key);
21:35 pyrootpy void keyReleased(int key);
21:36 pyrootpy void mouseMoved(int x, int y );
21:36 pyrootpy void mouseDragged(int x, int y, int button);
21:36 pyrootpy void mousePressed(int x, int y, int button);
21:36 pyrootpy void mouseReleased(int x, int y, int button);
21:36 pyrootpy void mouseEntered(int x, int y);
21:36 pyrootpy void mouseExited(int x, int y);
21:36 pyrootpy void windowResized(int w, int h);
21:36 pyrootpy void dragEvent(ofDragInfo dragInfo);
21:36 pyrootpy void gotMessage(ofMessage msg);
21:36 pyrootpy
21:36 pyrootpy //--------floating sliders-------
21:36 pyrootpy ofxPanel gui;
21:36 pyrootpy ofxIntSlider countX;
21:36 pyrootpy ofxFloatSlider stepX;
21:36 pyrootpy ofxFloatSlider twistX;
21:36 pyrootpy
21:36 pyrootpy //----------grouped sliders-------------
21:36 pyrootpy ofxGuiGroup globalGroup;
21:36 pyrootpy ofxFloatSlider Scale;
21:36 pyrootpy ofxFloatSlider Rotate;
21:36 pyrootpy ofxFloatSlider Background;
21:36 pyrootpy
21:36 pyrootpy //---------more class control-----
21:36 pyrootpy ofxGuiGroup primGroup;
21:36 pyrootpy ofxFloatSlider shiftY, rotate;
21:36 pyrootpy ofxVec2Slider size;
21:36 pyrootpy ofxColorSlider color;
21:36 pyrootpy ofxToggle filled, type;
21:36 pyrootpy
21:36 pyrootpy bool showGui;
21:37 pyrootpy
21:37 pyrootpy ofxIntSlider countY;
21:37 pyrootpy ofxFloatSlider stepY, twistY, pinchY;
21:37 pyrootpy void matrixPattern ();
21:37 pyrootpy
21:37 pyrootpy //-save to exit
21:37 pyrootpy void exit();
21:37 pyrootpy };
21:37 pyrootpy here it is
21:49 Beliq well bro
21:49 Beliq you actually just need to add     primGroup.setName("Primitive");
21:49 Beliq pyrootpy https://github.com/openframeworks/openFrameworks/blob/master/examples/gui/parameterGroupExample/src/ofApp.cpp#L8
21:54 Beliq joined #openframeworks
22:05 pyrootpy https://unsee.cc/baresuto/
22:05 pyrootpy thanks a lot dude
22:11 Beliq nice, np pyrootpy
22:13 pyrootpy :-)
22:19 jamtho joined #openframeworks
23:26 Beliq joined #openframeworks
23:27 Beliq joined #openframeworks

| Channels | #openframeworks index | Today | | Search | Google Search | Plain-Text | summary