Magpie/Runtime/UIDrawer.h
刘旭 bdc4088d59 feat: 创建一个 ImGUI backend 供 Magpie 使用
相比 win32 backend 相比主要的变化是光标位置的映射
2022-02-14 16:41:12 +08:00

24 lines
415 B
C++

#pragma once
#include "pch.h"
class UIDrawer {
public:
UIDrawer() = default;
UIDrawer(const UIDrawer&) = delete;
UIDrawer(UIDrawer&&) = delete;
~UIDrawer();
bool Initialize(ID3D11Texture2D* renderTarget);
void Draw();
private:
static bool _WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
UINT _handlerID = 0;
ID3D11RenderTargetView* _rtv = nullptr;
bool _cursorOnUI = false;
};