mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2026-08-06 18:42:36 -05:00
Version 1.91.7 of the imgui library with the cimgui wrapper. imgui allows us to easily create minimal and powerful UI for use-cases like in-game overlays or separate tooling. The additional wrappers cimgui_impl_dx9 and cimgui_impl_win32 were added to provide a full C linkage integration for the rest of the code base. Tweaks to the makefile were kept to a minimum but enable compilation of C++ since imgui is C++ based. Remark: At this point bemanitools itself is still to be kept a pure C codebase. Due to the lack of proper module/library management with the current build system in bemanitools 5, proper separation of concerns and clean integration with external libraries isn’t possible with reasonable effort.
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
#include <windows.h>
|
|
|
|
#include "imgui_impl_win32.h"
|
|
#include "imgui_internal.h"
|
|
#include "cimgui.h"
|
|
|
|
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
|
|
|
CIMGUI_API bool igImplWin32_Init(void* hwnd)
|
|
{
|
|
return ImGui_ImplWin32_Init(hwnd);
|
|
}
|
|
|
|
CIMGUI_API bool igImplWin32_InitForOpenGL(void* hwnd)
|
|
{
|
|
return ImGui_ImplWin32_InitForOpenGL(hwnd);
|
|
}
|
|
|
|
CIMGUI_API void igImplWin32_Shutdown()
|
|
{
|
|
ImGui_ImplWin32_Shutdown();
|
|
}
|
|
|
|
CIMGUI_API void igImplWin32_NewFrame()
|
|
{
|
|
ImGui_ImplWin32_NewFrame();
|
|
}
|
|
|
|
CIMGUI_API LRESULT igImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|
{
|
|
return ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam);
|
|
}
|
|
|
|
CIMGUI_API void igImplWin32_EnableDpiAwareness()
|
|
{
|
|
ImGui_ImplWin32_EnableDpiAwareness();
|
|
}
|
|
|
|
CIMGUI_API float igImplWin32_GetDpiScaleForHwnd(void* hwnd)
|
|
{
|
|
return ImGui_ImplWin32_GetDpiScaleForHwnd(hwnd);
|
|
}
|
|
|
|
CIMGUI_API float igImplWin32_GetDpiScaleForMonitor(void* monitor)
|
|
{
|
|
return ImGui_ImplWin32_GetDpiScaleForMonitor(monitor);
|
|
}
|
|
|
|
CIMGUI_API void igImplWin32_EnableAlphaCompositing(void* hwnd)
|
|
{
|
|
ImGui_ImplWin32_EnableAlphaCompositing(hwnd);
|
|
} |