mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Cleanup.
This commit is contained in:
parent
af2bb3874d
commit
1cf4f92152
3 changed files with 59 additions and 33 deletions
2
3rdparty/ocornut-imgui/imgui.cpp
vendored
2
3rdparty/ocornut-imgui/imgui.cpp
vendored
|
@ -9707,6 +9707,8 @@ void ImFontAtlas::ClearInputData()
|
|||
ImGui::MemFree(ConfigData[i].FontData);
|
||||
ConfigData[i].FontData = NULL;
|
||||
}
|
||||
|
||||
ConfigData.clear();
|
||||
}
|
||||
|
||||
void ImFontAtlas::ClearTexData()
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue