/** AsterTrack Configurator Copyright (C) 2023 Seneral and contributors This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "imgui.h" #include #ifndef IMGUI_ONDEMAND_H #define IMGUI_ONDEMAND_H struct OnDemandState { ImGuiViewport *viewport; ImVec2 pos; ImVec2 clipMin, clipMax; ImFont *font; float fontSize; void *userData; }; extern std::vector onDemandStack; void OnDemandNewFrame(); OnDemandState &MarkOnDemandArea(const ImRect &bb); OnDemandState &AddOnDemandItem(ImGuiID id, const ImRect &bb); void AddOnDemandRender(ImGuiID id, const ImVec4 &bb, ImDrawCallback RenderCallback, void *userData = nullptr); void AddOnDemandText(const char* maxText, ImDrawCallback RenderCallback); void RenderOnDemandText(const OnDemandState &state, const char* fmt, ...); void RenderOnDemandTextV(const OnDemandState &state, const char* fmt, va_list args); #endif // IMGUI_ONDEMAND_H