mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
- added a default cursor for Chex Quest.
- set 'cursor' as default for Action Doom 2. Doom's bunny is probably not the best thing here... - made cursor user-settable in the menu. SVN r2855 (trunk)
This commit is contained in:
parent
cf9792ed53
commit
9abaaa1785
6 changed files with 55 additions and 21 deletions
|
@ -184,6 +184,23 @@ CUSTOM_CVAR (Int, fraglimit, 0, CVAR_SERVERINFO)
|
||||||
CVAR (Float, timelimit, 0.f, CVAR_SERVERINFO);
|
CVAR (Float, timelimit, 0.f, CVAR_SERVERINFO);
|
||||||
CVAR (Int, wipetype, 1, CVAR_ARCHIVE);
|
CVAR (Int, wipetype, 1, CVAR_ARCHIVE);
|
||||||
CVAR (Int, snd_drawoutput, 0, 0);
|
CVAR (Int, snd_drawoutput, 0, 0);
|
||||||
|
CUSTOM_CVAR (String, vid_cursor, "None", CVAR_ARCHIVE | CVAR_NOINITCALL)
|
||||||
|
{
|
||||||
|
bool res = false;
|
||||||
|
|
||||||
|
if (!stricmp(self, "None" ) && gameinfo.CursorPic.IsNotEmpty())
|
||||||
|
{
|
||||||
|
res = I_SetCursor(TexMan[gameinfo.CursorPic]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
res = I_SetCursor(TexMan[self]);
|
||||||
|
}
|
||||||
|
if (!res)
|
||||||
|
{
|
||||||
|
I_SetCursor(TexMan["cursor"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool DrawFSHUD; // [RH] Draw fullscreen HUD?
|
bool DrawFSHUD; // [RH] Draw fullscreen HUD?
|
||||||
TArray<FString> allwads;
|
TArray<FString> allwads;
|
||||||
|
@ -901,10 +918,7 @@ void D_DoomLoop ()
|
||||||
// Clamp the timer to TICRATE until the playloop has been entered.
|
// Clamp the timer to TICRATE until the playloop has been entered.
|
||||||
r_NoInterpolate = true;
|
r_NoInterpolate = true;
|
||||||
|
|
||||||
if (gameinfo.CursorPic.IsEmpty() || !I_SetCursor(TexMan[gameinfo.CursorPic]))
|
vid_cursor.Callback();
|
||||||
{
|
|
||||||
I_SetCursor(TexMan["cursor"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1186,28 +1186,33 @@ bool I_SetCursor(FTexture *cursorpic)
|
||||||
{
|
{
|
||||||
HCURSOR cursor;
|
HCURSOR cursor;
|
||||||
|
|
||||||
// Must be no larger than 32x32.
|
if (cursorpic != NULL && cursorpic->UseType != FTexture::TEX_Null)
|
||||||
if (cursorpic->GetWidth() > 32 || cursorpic->GetHeight() > 32)
|
|
||||||
{
|
{
|
||||||
return false;
|
// Must be no larger than 32x32.
|
||||||
}
|
if (cursorpic->GetWidth() > 32 || cursorpic->GetHeight() > 32)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
cursor = CreateAlphaCursor(cursorpic);
|
cursor = CreateAlphaCursor(cursorpic);
|
||||||
if (cursor == NULL)
|
if (cursor == NULL)
|
||||||
{
|
{
|
||||||
cursor = CreateCompatibleCursor(cursorpic);
|
cursor = CreateCompatibleCursor(cursorpic);
|
||||||
|
}
|
||||||
|
if (cursor == NULL)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Replace the existing cursor with the new one.
|
||||||
|
DestroyCustomCursor();
|
||||||
|
CustomCursor = cursor;
|
||||||
|
atterm(DestroyCustomCursor);
|
||||||
}
|
}
|
||||||
if (cursor == NULL)
|
else
|
||||||
{
|
{
|
||||||
return false;
|
DestroyCustomCursor();
|
||||||
|
cursor = LoadCursor(NULL, IDC_ARROW);
|
||||||
}
|
}
|
||||||
// Replace the existing cursor with the new one.
|
|
||||||
if (CustomCursor != NULL)
|
|
||||||
{
|
|
||||||
DestroyCursor(CustomCursor);
|
|
||||||
}
|
|
||||||
CustomCursor = cursor;
|
|
||||||
atterm(DestroyCustomCursor);
|
|
||||||
SetClassLongPtr(Window, GCLP_HCURSOR, (LONG_PTR)cursor);
|
SetClassLongPtr(Window, GCLP_HCURSOR, (LONG_PTR)cursor);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
BIN
wadsrc/static/graphics/chexcurs.png
Normal file
BIN
wadsrc/static/graphics/chexcurs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 358 B |
|
@ -55,6 +55,7 @@ gameinfo
|
||||||
playerclasses = "ChexPlayer"
|
playerclasses = "ChexPlayer"
|
||||||
pausesign = "M_PAUSE"
|
pausesign = "M_PAUSE"
|
||||||
gibfactor = 1
|
gibfactor = 1
|
||||||
|
cursorpic = "chexcurs"
|
||||||
}
|
}
|
||||||
|
|
||||||
skill baby
|
skill baby
|
||||||
|
|
|
@ -3,5 +3,6 @@ include "mapinfo/doom2.txt"
|
||||||
gameinfo
|
gameinfo
|
||||||
{
|
{
|
||||||
swapmenu = true
|
swapmenu = true
|
||||||
|
cursorpic = "cursor"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -510,6 +510,18 @@ OptionValue "MenuMouse"
|
||||||
2, "Touchscreen-like"
|
2, "Touchscreen-like"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OptionString "Cursors"
|
||||||
|
{
|
||||||
|
"None", "Default"
|
||||||
|
"cursor", "Simple arrow"
|
||||||
|
"doomcurs", "Doom"
|
||||||
|
"herecurs", "Heretic"
|
||||||
|
"hexncurs", "Hexen"
|
||||||
|
"strfcurs", "Strife"
|
||||||
|
"chexcurs", "Chex"
|
||||||
|
"-", "System cursor"
|
||||||
|
}
|
||||||
|
|
||||||
OptionMenu "MouseOptions"
|
OptionMenu "MouseOptions"
|
||||||
{
|
{
|
||||||
Title "MOUSE OPTIONS"
|
Title "MOUSE OPTIONS"
|
||||||
|
@ -518,6 +530,7 @@ OptionMenu "MouseOptions"
|
||||||
{
|
{
|
||||||
Option "Enable mouse in menus", "m_use_mouse", "MenuMouse", "use_mouse"
|
Option "Enable mouse in menus", "m_use_mouse", "MenuMouse", "use_mouse"
|
||||||
Option "Show back button", "m_show_backbutton", "Corners", "use_mouse"
|
Option "Show back button", "m_show_backbutton", "Corners", "use_mouse"
|
||||||
|
Option "Cursor", "vid_cursor", "Cursors"
|
||||||
}
|
}
|
||||||
StaticText ""
|
StaticText ""
|
||||||
Slider "Overall sensitivity", "mouse_sensitivity", 0.5, 2.5, 0.1
|
Slider "Overall sensitivity", "mouse_sensitivity", 0.5, 2.5, 0.1
|
||||||
|
|
Loading…
Reference in a new issue