mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-11 20:05:58 +03:00
feat(glue): set up cursor image from CGlueMgr
This commit is contained in:
parent
dd7dee7232
commit
671fd73fd3
@ -48,6 +48,7 @@ char CGlueMgr::m_accountName[1280];
|
|||||||
float CGlueMgr::m_aspect;
|
float CGlueMgr::m_aspect;
|
||||||
bool CGlueMgr::m_authenticated;
|
bool CGlueMgr::m_authenticated;
|
||||||
char CGlueMgr::m_currentScreen[64];
|
char CGlueMgr::m_currentScreen[64];
|
||||||
|
MipBits* CGlueMgr::m_cursorMipBits;
|
||||||
int32_t CGlueMgr::m_disconnectPending;
|
int32_t CGlueMgr::m_disconnectPending;
|
||||||
int32_t CGlueMgr::m_displayingQueueDialog;
|
int32_t CGlueMgr::m_displayingQueueDialog;
|
||||||
CGlueMgr::GLUE_IDLE_STATE CGlueMgr::m_idleState;
|
CGlueMgr::GLUE_IDLE_STATE CGlueMgr::m_idleState;
|
||||||
@ -469,6 +470,20 @@ void CGlueMgr::PollLoginServerLogin() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGlueMgr::InitCursor() {
|
||||||
|
uint32_t width;
|
||||||
|
uint32_t height;
|
||||||
|
PIXEL_FORMAT format = PIXEL_ARGB8888;
|
||||||
|
|
||||||
|
CGlueMgr::m_cursorMipBits = TextureLoadImage("Interface\\Cursor\\Point.blp", &width, &height, &format, nullptr, nullptr, nullptr, 0);
|
||||||
|
|
||||||
|
STORM_ASSERT(width == 32);
|
||||||
|
STORM_ASSERT(height == 32);
|
||||||
|
STORM_ASSERT(format == PIXEL_ARGB8888);
|
||||||
|
|
||||||
|
CGlueMgr::m_simpleTop->SetCursor(CGlueMgr::m_cursorMipBits);
|
||||||
|
}
|
||||||
|
|
||||||
void CGlueMgr::Resume() {
|
void CGlueMgr::Resume() {
|
||||||
// TODO
|
// TODO
|
||||||
// CGlueMgr::m_disconnectPending = 0;
|
// CGlueMgr::m_disconnectPending = 0;
|
||||||
@ -497,8 +512,9 @@ void CGlueMgr::Resume() {
|
|||||||
CGlueMgr::m_simpleTop = top;
|
CGlueMgr::m_simpleTop = top;
|
||||||
CGlueMgr::m_simpleTop->m_displaySizeCallback = &CGlueMgr::HandleDisplaySizeChanged;
|
CGlueMgr::m_simpleTop->m_displaySizeCallback = &CGlueMgr::HandleDisplaySizeChanged;
|
||||||
|
|
||||||
|
CGlueMgr::InitCursor();
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
// - setting cursor texture
|
|
||||||
// - setting mouse mode
|
// - setting mouse mode
|
||||||
|
|
||||||
FrameScript_Flush();
|
FrameScript_Flush();
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include "event/Event.hpp"
|
#include "event/Event.hpp"
|
||||||
#include "net/Types.hpp"
|
#include "net/Types.hpp"
|
||||||
|
#include "gx/Texture.hpp"
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
class CSimpleTop;
|
class CSimpleTop;
|
||||||
@ -36,6 +37,7 @@ class CGlueMgr {
|
|||||||
static float m_aspect;
|
static float m_aspect;
|
||||||
static bool m_authenticated;
|
static bool m_authenticated;
|
||||||
static char m_currentScreen[];
|
static char m_currentScreen[];
|
||||||
|
static MipBits* m_cursorMipBits;
|
||||||
static int32_t m_disconnectPending;
|
static int32_t m_disconnectPending;
|
||||||
static int32_t m_displayingQueueDialog;
|
static int32_t m_displayingQueueDialog;
|
||||||
static GLUE_IDLE_STATE m_idleState;
|
static GLUE_IDLE_STATE m_idleState;
|
||||||
@ -61,6 +63,7 @@ class CGlueMgr {
|
|||||||
static int32_t HandleDisplaySizeChanged(const CSizeEvent& event);
|
static int32_t HandleDisplaySizeChanged(const CSizeEvent& event);
|
||||||
static int32_t Idle(const void* a1, void* a2);
|
static int32_t Idle(const void* a1, void* a2);
|
||||||
static void Initialize();
|
static void Initialize();
|
||||||
|
static void InitCursor();
|
||||||
static void LoginServerLogin(const char* accountName, const char* password);
|
static void LoginServerLogin(const char* accountName, const char* password);
|
||||||
static void QuitGame();
|
static void QuitGame();
|
||||||
static void PollAccountLogin(int32_t errorCode, const char* msg, int32_t complete, int32_t result, WOWCS_OPS op);
|
static void PollAccountLogin(int32_t errorCode, const char* msg, int32_t complete, int32_t result, WOWCS_OPS op);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user