Skip to content

Commit 7b1cc52

Browse files
committed
adapted inspector for new docking gui
1 parent d365488 commit 7b1cc52

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

src/ofxVisualProgramming.cpp

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ ofxVisualProgramming::ofxVisualProgramming(){
8888

8989
profilerActive = false;
9090
inspectorActive = false;
91-
inspectorTitle = "";
92-
lastInspectorWidth = 0.0f;
9391

9492
inited = false;
9593

@@ -364,25 +362,25 @@ void ofxVisualProgramming::draw(){
364362
//--------------------------------------------------------------
365363
void ofxVisualProgramming::drawInspector(){
366364

367-
ImGui::SetNextWindowSize(ImVec2(lastInspectorWidth,ofGetWindowHeight()-(46*scaleFactor)), ImGuiCond_Always );
368-
ImGui::SetNextWindowPos(ImVec2(ofGetWindowWidth()-lastInspectorWidth,26*scaleFactor), ImGuiCond_Always);
365+
ImGui::SetNextWindowSize(ImVec2(ofGetWindowWidth()/4,ofGetWindowHeight()-(46*scaleFactor)), ImGuiCond_Appearing );
366+
//ImGui::SetNextWindowPos(ImVec2(ofGetWindowWidth()-200,26*scaleFactor), ImGuiCond_Appearing);
369367

370-
if(patchObjects.find(nodeCanvas.getActiveNode()) != patchObjects.end()){
371-
inspectorTitle = "Inspector | "+patchObjects[nodeCanvas.getActiveNode()]->getDisplayName()+" | id: "+ofToString(nodeCanvas.getActiveNode());
372-
}else{
373-
inspectorTitle = "Inspector";
374-
}
375-
ImGui::Begin(inspectorTitle.c_str(), 0, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysAutoResize);
368+
ImGui::Begin("Inspector", 0, ImGuiWindowFlags_NoCollapse);
376369

377370
// if object id exists
378371
if(patchObjects.find(nodeCanvas.getActiveNode()) != patchObjects.end()){
379372

373+
ImGui::Text("%s",patchObjects[nodeCanvas.getActiveNode()]->getDisplayName().c_str());
374+
ImGui::Spacing();
375+
ImGui::Spacing();
376+
ImGui::Text("id: %s",ofToString(nodeCanvas.getActiveNode()).c_str());
377+
ImGui::Spacing();
378+
ImGui::Spacing();
379+
380380
patchObjects[nodeCanvas.getActiveNode()]->drawImGuiNodeConfig();
381381

382-
lastInspectorWidth = patchObjects[nodeCanvas.getActiveNode()]->getConfigmenuWidth();
383382
}
384383

385-
386384
ImGui::End();
387385
}
388386

src/ofxVisualProgramming.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,6 @@ class ofxVisualProgramming : public pdsp::Wrapper {
164164
bool inspectorActive;
165165
bool inited;
166166

167-
// GUI
168-
string inspectorTitle;
169-
float lastInspectorWidth;
170-
171167
// LIVE PATCHING
172168
int livePatchingObiID;
173169

0 commit comments

Comments
 (0)