mirror of
https://github.com/rrika/cdcEngineDXHR.git
synced 2024-11-27 07:20:22 +00:00
add yellow cursor
This commit is contained in:
parent
6a43434d0a
commit
55095de038
15
main2.cpp
15
main2.cpp
@ -79,6 +79,7 @@ LRESULT CALLBACK gameWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
DisplayConfig displayConfig;
|
||||
HWND hwnd;
|
||||
void *yellowCursor;
|
||||
|
||||
void createWindow() {
|
||||
WNDCLASSW wndClass = { sizeof(wndClass) };
|
||||
@ -89,7 +90,19 @@ void createWindow() {
|
||||
// wndClass.hIcon = LoadIconW(0, (LPCWSTR)0x7F00);
|
||||
wndClass.lpszClassName = L"DeusExHRDCE";
|
||||
// wndClass.hbrBackground = (HBRUSH)GetStockObject(5);
|
||||
// wndClass.hCursor = LoadCursorW(0, (LPCWSTR)0x7F00);
|
||||
wndClass.hCursor = LoadCursorW(0, (LPCWSTR)0x7F00); // normal cursor
|
||||
|
||||
if (true) { // HACK
|
||||
ICONINFO ii;
|
||||
auto pointerIcon = LoadIconA(wndClass.hInstance, (LPCSTR)109);
|
||||
GetIconInfo(pointerIcon, &ii);
|
||||
ii.fIcon = 0;
|
||||
ii.xHotspot = 5;
|
||||
ii.yHotspot = 5;
|
||||
wndClass.hCursor = CreateIconIndirect(&ii); // new and improved (yellow) cursor
|
||||
}
|
||||
|
||||
yellowCursor = wndClass.hCursor;
|
||||
|
||||
RegisterClassW(&wndClass);
|
||||
|
||||
|
1
main2.h
1
main2.h
@ -1,2 +1,3 @@
|
||||
#pragma once
|
||||
extern void *yellowCursor;
|
||||
int WinMain2(HINSTANCE hInstance, LPSTR lpCmdLine);
|
||||
|
BIN
res/cursor.ico
Normal file
BIN
res/cursor.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
@ -1 +1,2 @@
|
||||
102 ICON "icon.ico"
|
||||
109 ICON "cursor.ico"
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "spinnycube.h"
|
||||
#include "types.h"
|
||||
#include "matrix.h"
|
||||
#include "main2.h" // for yellowCursor
|
||||
#include "drm/ResolveReceiver.h"
|
||||
#include "drm/sections/MaterialSection.h"
|
||||
#include "drm/sections/RenderResourceSection.h"
|
||||
@ -504,8 +505,9 @@ int spinnyCube(HWND window,
|
||||
|
||||
#if ENABLE_IMGUI
|
||||
ImGui_ImplDX11_NewFrame();
|
||||
ImGui_ImplWin32_NewFrame();
|
||||
ImGui_ImplWin32_NewFrame(); // this will reset our pretty cursor
|
||||
ImGui::NewFrame();
|
||||
SetCursor((HCURSOR)yellowCursor); // ahh, much better
|
||||
#endif
|
||||
|
||||
// cubePass.viewport ->
|
||||
|
Loading…
Reference in New Issue
Block a user