![]() |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Macros | |
#define | SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE SDL_VERSION_ATLEAST(2,0,4) |
#define | SDL_HAS_VULKAN SDL_VERSION_ATLEAST(2,0,6) |
#define | MAP_BUTTON(NAV_NO, BUTTON_NO) { io.NavInputs[NAV_NO] = (SDL_GameControllerGetButton(game_controller, BUTTON_NO) != 0) ? 1.0f : 0.0f; } |
#define | MAP_ANALOG(NAV_NO, AXIS_NO, V0, V1) { float vn = (float)(SDL_GameControllerGetAxis(game_controller, AXIS_NO) - V0) / (float)(V1 - V0); if (vn > 1.0f) vn = 1.0f; if (vn > 0.0f && io.NavInputs[NAV_NO] < vn) io.NavInputs[NAV_NO] = vn; } |
Functions | |
bool | ImGui_ImplSDL2_ProcessEvent (const SDL_Event *event) |
bool | ImGui_ImplSDL2_InitForOpenGL (SDL_Window *window, void *sdl_gl_context) |
bool | ImGui_ImplSDL2_InitForVulkan (SDL_Window *window) |
bool | ImGui_ImplSDL2_InitForD3D (SDL_Window *window) |
bool | ImGui_ImplSDL2_InitForMetal (SDL_Window *window) |
void | ImGui_ImplSDL2_Shutdown () |
void | ImGui_ImplSDL2_NewFrame (SDL_Window *window) |
void | ImGui_ImplSDL2_SetActiveWindowOverride (bool override_state) |
Special function used to override active window checks. More... | |
#define MAP_ANALOG | ( | NAV_NO, | |
AXIS_NO, | |||
V0, | |||
V1 | |||
) | { float vn = (float)(SDL_GameControllerGetAxis(game_controller, AXIS_NO) - V0) / (float)(V1 - V0); if (vn > 1.0f) vn = 1.0f; if (vn > 0.0f && io.NavInputs[NAV_NO] < vn) io.NavInputs[NAV_NO] = vn; } |
#define MAP_BUTTON | ( | NAV_NO, | |
BUTTON_NO | |||
) | { io.NavInputs[NAV_NO] = (SDL_GameControllerGetButton(game_controller, BUTTON_NO) != 0) ? 1.0f : 0.0f; } |
#define SDL_HAS_CAPTURE_AND_GLOBAL_MOUSE SDL_VERSION_ATLEAST(2,0,4) |
#define SDL_HAS_VULKAN SDL_VERSION_ATLEAST(2,0,6) |
bool ImGui_ImplSDL2_InitForD3D | ( | SDL_Window * | window | ) |
bool ImGui_ImplSDL2_InitForMetal | ( | SDL_Window * | window | ) |
bool ImGui_ImplSDL2_InitForOpenGL | ( | SDL_Window * | window, |
void * | sdl_gl_context | ||
) |
bool ImGui_ImplSDL2_InitForVulkan | ( | SDL_Window * | window | ) |
void ImGui_ImplSDL2_NewFrame | ( | SDL_Window * | window | ) |
bool ImGui_ImplSDL2_ProcessEvent | ( | const SDL_Event * | event | ) |
void ImGui_ImplSDL2_SetActiveWindowOverride | ( | bool | override_state | ) |
Special function used to override active window checks.
When the engine is hooked using Qt (aka, when the engine is rendering to a viewport in the editing kit), SDL simply refuses to set the active window state - and there is no way to override this using SDL alone.
The solution implemented is to add an optional override check that can be called when using Qt. When this is set to true
, ImGUI will always behave as though the window is focused - which may or may not cause issues. It is best to keep this state consistent with the focused state of the Qt5 widget itself.
override_state | - Whether or not to behave as though the engine viewport is focused. |
void ImGui_ImplSDL2_Shutdown | ( | ) |