Skip to content

Commit 37ee508

Browse files
committed
preparing for upgrading imgui to 1.77 WIP
1 parent 1f3f5ec commit 37ee508

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/core/imgui_helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ inline void drawOFTexture(ofTexture* tex, float& _tw, float& _th, float& posX, f
6666
ImVec2 cursor_pos = ImGui::GetCursorPos();
6767
ImGui::SetCursorPos(ImVec2(posX,posY+IMGUI_EX_NODE_HEADER_HEIGHT));
6868

69-
ofxImGui::AddImage(*tex, ImVec2(drawW, drawH));
69+
ofxImGui::AddImage(*tex, ofVec2f(drawW, drawH));
7070

7171
ImGui::SetCursorPos(cursor_pos);
7272

src/ofxVisualProgramming.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ void ofxVisualProgramming::draw(){
248248
ofPushMatrix();
249249

250250
// Init canvas
251-
nodeCanvas.SetTransform( canvas.getTranslation(), canvas.getScale() );//canvas.getScrollPosition(), canvas.getScale(true) );
251+
nodeCanvas.SetTransform( ImVec2(canvas.getTranslation().x,canvas.getTranslation().y), canvas.getScale() );//canvas.getScrollPosition(), canvas.getScale(true) );
252252

253253
// DEBUG
254254
if(OFXVP_DEBUG){
@@ -291,7 +291,7 @@ void ofxVisualProgramming::draw(){
291291

292292
// Try to begin ImGui Canvas.
293293
// Should always return true, except if window is minimised or somehow not rendered.
294-
ImGui::SetNextWindowPos(canvasViewport.getTopLeft(), ImGuiCond_Always );
294+
ImGui::SetNextWindowPos(ImVec2(canvasViewport.getTopLeft().x,canvasViewport.getTopLeft().y), ImGuiCond_Always );
295295
ImGui::SetNextWindowSize( ImVec2(canvasViewport.width, canvasViewport.height), ImGuiCond_Always );
296296
bool isCanvasVisible = nodeCanvas.Begin("ofxVPNodeCanvas" );
297297
if ( isCanvasVisible ){

0 commit comments

Comments
 (0)