imguiManager et start Fullscreen
This commit is contained in:
48
enginecustom/imguiManager.cpp
Normal file
48
enginecustom/imguiManager.cpp
Normal file
@@ -0,0 +1,48 @@
|
||||
#include "imguiManager.h"
|
||||
|
||||
imguiManager::imguiManager()
|
||||
{
|
||||
io = nullptr;
|
||||
}
|
||||
|
||||
imguiManager::~imguiManager()
|
||||
{
|
||||
}
|
||||
|
||||
bool imguiManager::Initialize(HWND hwnd, ID3D11Device* device, ID3D11DeviceContext* deviceContext)
|
||||
{
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
io = &ImGui::GetIO();
|
||||
|
||||
ImGui_ImplWin32_Init(hwnd);
|
||||
ImGui_ImplDX11_Init(device, deviceContext);
|
||||
ImGui::StyleColorsDark();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void imguiManager::Shutdown()
|
||||
{
|
||||
ImGui_ImplDX11_Shutdown();
|
||||
ImGui_ImplWin32_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
}
|
||||
|
||||
void imguiManager::Render()
|
||||
{
|
||||
ImGui::Render();
|
||||
ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
|
||||
}
|
||||
|
||||
void imguiManager::NewFrame()
|
||||
{
|
||||
ImGui_ImplDX11_NewFrame();
|
||||
ImGui_ImplWin32_NewFrame();
|
||||
ImGui::NewFrame();
|
||||
}
|
||||
|
||||
void imguiManager::WidgetFullscreenBox(bool* fullscreen)
|
||||
{
|
||||
ImGui::Checkbox("Fullscreen", fullscreen);
|
||||
}
|
||||
Reference in New Issue
Block a user