| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #pragma once
- #include "saura/core/server/server.hpp"
- #include <cstdint>
- #include <imgui.h>
- #include <memory>
- #include <string>
- #include <vector>
- namespace saura {
- struct Entity {
- std::string uuid;
- uint32_t local_tmp_id;
- std::string title;
- std::string url;
- struct {
- ImVec2 min;
- ImVec2 max;
- } rect;
- };
- struct ServerInfo {
- bool is_connect;
- };
- class UI {
- private:
- Entity *current_ent;
- std::vector<Entity> entities;
- ServerInfo server_info;
- struct {
- std::weak_ptr<ServerAPI> server_api_ctx;
- } deps;
- public:
- UI(std::shared_ptr<ServerAPI> server_api_ctx);
- ~UI();
- void draw();
- };
- } // namespace saura
|