Expand all graphics retrieval with bitmap and vram

This commit is contained in:
Justin Scofield
2022-07-17 18:09:12 -04:00
parent 5a62497110
commit 67e1e7ea0c
12 changed files with 165 additions and 115 deletions

View File

@@ -4,6 +4,7 @@
#include <imgui/imgui.h>
#include <cmath>
#include <memory>
#include <string>
namespace yaze {
@@ -11,18 +12,30 @@ namespace gui {
class Canvas {
public:
Canvas() = default;
Canvas(ImVec2 canvas_size)
: canvas_sz_(canvas_size), custom_canvas_size_(true) {}
void Update();
void DrawBackground();
void UpdateContext();
void DrawGrid();
void DrawOverlay(); // last
private:
bool enable_grid_ = true;
bool enable_context_menu_ = true;
bool dragging_select_ = false;
bool custom_canvas_size_ = false;
std::string title_;
ImDrawList* draw_list_;
ImVector<ImVec2> points_;
ImVec2 scrolling_;
ImVec2 canvas_sz_;
ImVec2 canvas_p0_;
ImVec2 canvas_p1_;
};
} // namespace gui
} // namespace yaze