This commit is contained in:
Branimir Karadžić 2015-07-15 10:53:37 -07:00
parent af2bb3874d
commit 1cf4f92152
3 changed files with 59 additions and 33 deletions

View file

@ -9707,6 +9707,8 @@ void ImFontAtlas::ClearInputData()
ImGui::MemFree(ConfigData[i].FontData);
ConfigData[i].FontData = NULL;
}
ConfigData.clear();
}
void ImFontAtlas::ClearTexData()

View file

@ -1063,4 +1063,28 @@ namespace Scintilla
} // namespace Scintilla
ScintillaEditor* ImGuiScintilla(const char* _name, bool* _opened, const ImVec2& _size)
{
ScintillaEditor* sci = NULL;
if (ImGui::Begin(_name, _opened, _size) )
{
ImGuiStorage* storage = ImGui::GetStateStorage();
ImGuiID id = ImGui::GetID(_name);
sci = (ScintillaEditor*)storage->GetVoidPtr(id);
if (NULL == sci)
{
ImVec2 size = ImGui::GetWindowSize();
sci = ScintillaEditor::create(size.x, size.y);
storage->SetVoidPtr(id, (void*)sci);
}
sci->draw();
}
ImGui::End();
return sci;
}
#endif // defined(SCI_NAMESPACE)