Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jvcleave committed Mar 18, 2016
1 parent d287156 commit efc06bf
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ofxImgui
ofxImGui
========

ofxAddon that allows you to use [ImGui](https://github.com/ocornut/imgui) in [openFrameworks](https://github.com/openframeworks/openFrameworks)
Expand Down Expand Up @@ -35,7 +35,7 @@ class ofApp : public ofBaseApp

...

ofxImGui m_ui;
ofxImGui gui;
}
```
Expand All @@ -44,12 +44,12 @@ In `ofApp.cpp`:
```cpp
void ofApp::setup()
{
m_ui.setup();
gui.setup();
}
void ofApp::draw()
{
m_ui.begin();
gui.begin();
static bool show_another_window = true;
static bool show_test_window = true;
Expand All @@ -68,7 +68,7 @@ void ofApp::draw()
ImGui::ShowTestWindow(&show_test_window);
}
m_ui.end();
gui.end();
}
```

Expand All @@ -82,18 +82,18 @@ GLuint tex_button;

void ofApp::setup()
{
m_ui.setup();
gui.setup();

tex_button = m_ui.loadImage("youtube.png");
tex_button = gui.loadImage("youtube.png");
}

void ofApp::draw()
{
m_ui.begin();
gui.begin();

bool pressed = ImGui::ImageButton((ImTextureID)(uintptr_t)tex_button, ImVec2(200, 141));

m_ui.end();
gui.end();
}
```

Expand All @@ -109,6 +109,6 @@ void ofApp::setup()
ImGuiIO * io = &ImGui::GetIO();
io->Fonts->AddFontFromFileTTF(&ofToDataPath("NotoSans.ttf")[0], 24.f);

m_ui.setup();
gui.setup();
}
```

0 comments on commit efc06bf

Please sign in to comment.