From c9719151d9b60865dc4603eb9fe09529fecefcbf Mon Sep 17 00:00:00 2001 From: Liny Date: Sun, 18 May 2014 20:28:10 -0700 Subject: [PATCH] Fix legacy cursor hotspots on mac and linux builds --- indra/llwindow/llwindowmacosx.cpp | 20 +++++++++++++++----- indra/llwindow/llwindowsdl.cpp | 8 ++++---- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 2984c6b7e7..85d405e847 100755 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1366,7 +1366,7 @@ const char* cursorIDToName(int id) case UI_CURSOR_TOOLSIT: if (use_legacy_cursors) return "UI_CURSOR_TOOLSIT_LEGACY"; else return "UI_CURSOR_TOOLSIT"; case UI_CURSOR_TOOLBUY: if (use_legacy_cursors) return "UI_CURSOR_TOOLBUY_LEGACY"; else return "UI_CURSOR_TOOLBUY"; case UI_CURSOR_TOOLOPEN: if (use_legacy_cursors) return "UI_CURSOR_TOOLOPEN_LEGACY"; else return "UI_CURSOR_TOOLOPEN"; - case UI_CURSOR_TOOLPAY: if (use_legacy_cursors) return "UI_CURSOR_TOOLBUY_LEGACY"; else return "UI_CURSOR_TOOLPAY"; + case UI_CURSOR_TOOLPAY: if (use_legacy_cursors) return "UI_CURSOR_TOOLPAY_LEGACY"; else return "UI_CURSOR_TOOLBUY"; } llerrs << "cursorIDToName: unknown cursor id" << id << llendl; @@ -1520,10 +1520,20 @@ void LLWindowMacOSX::initCursors() initPixmapCursor(UI_CURSOR_TOOLPLAY, 1, 1); initPixmapCursor(UI_CURSOR_TOOLPAUSE, 1, 1); initPixmapCursor(UI_CURSOR_TOOLMEDIAOPEN, 1, 1); - initPixmapCursor(UI_CURSOR_TOOLSIT, 20, 15); - initPixmapCursor(UI_CURSOR_TOOLBUY, 20, 15); - initPixmapCursor(UI_CURSOR_TOOLOPEN, 20, 15); - initPixmapCursor(UI_CURSOR_TOOLPAY, 20, 15); + if (gSavedSettings.getBOOL("UseLegacyCursors")) + { + initPixmapCursor(UI_CURSOR_TOOLSIT, 0, 0); + initPixmapCursor(UI_CURSOR_TOOLBUY, 0, 0); + initPixmapCursor(UI_CURSOR_TOOLOPEN, 0, 0); + initPixmapCursor(UI_CURSOR_TOOLPAY, 0, 0); + } + else + { + initPixmapCursor(UI_CURSOR_TOOLSIT, 20, 15); + initPixmapCursor(UI_CURSOR_TOOLBUY, 20, 15); + initPixmapCursor(UI_CURSOR_TOOLOPEN, 20, 15); + initPixmapCursor(UI_CURSOR_TOOLPAY, 20, 15); + } initPixmapCursor(UI_CURSOR_TOOLPATHFINDING, 16, 16); initPixmapCursor(UI_CURSOR_TOOLPATHFINDING_PATH_START, 16, 16); initPixmapCursor(UI_CURSOR_TOOLPATHFINDING_PATH_START_ADD, 16, 16); diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index c3c065e81d..f87b1a4f78 100755 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -2162,10 +2162,10 @@ void LLWindowSDL::initCursors() mSDLCursors[UI_CURSOR_TOOLMEDIAOPEN] = makeSDLCursorFromBMP("toolmediaopen.BMP",0,0); mSDLCursors[UI_CURSOR_PIPETTE] = makeSDLCursorFromBMP("lltoolpipette.BMP",2,28); if (gSavedSettings.getBOOL("UseLegacyCursors")) { - mSDLCursors[UI_CURSOR_TOOLSIT] = makeSDLCursorFromBMP("toolsit-legacy.BMP",20,15); - mSDLCursors[UI_CURSOR_TOOLBUY] = makeSDLCursorFromBMP("toolbuy-legacy.BMP",20,15); - mSDLCursors[UI_CURSOR_TOOLOPEN] = makeSDLCursorFromBMP("toolopen-legacy.BMP",20,15); - mSDLCursors[UI_CURSOR_TOOLPAY] = makeSDLCursorFromBMP("toolpay-legacy.BMP",20,15); + mSDLCursors[UI_CURSOR_TOOLSIT] = makeSDLCursorFromBMP("toolsit-legacy.BMP",0,0); + mSDLCursors[UI_CURSOR_TOOLBUY] = makeSDLCursorFromBMP("toolbuy-legacy.BMP",0,0); + mSDLCursors[UI_CURSOR_TOOLOPEN] = makeSDLCursorFromBMP("toolopen-legacy.BMP",0,0); + mSDLCursors[UI_CURSOR_TOOLPAY] = makeSDLCursorFromBMP("toolpay-legacy.BMP",0,0); } else {