Adding a cursor
Revision as of 10:12, 27 September 2007 by James Linden (talk | contribs) (New page: * Add new entry to enum ECursorType in llwindow.h ** For example, UI_CURSOR_STUFF === Windows === * Create art for Windows ** Go into indra/newview/res ** Duplicate toolopen.cur ** Name ne...)
- Add new entry to enum ECursorType in llwindow.h
- For example, UI_CURSOR_STUFF
Windows
- Create art for Windows
- Go into indra/newview/res
- Duplicate toolopen.cur
- Name new file something like toolstuff.cur
- Visual Studio > View > Resource View
- Right-click newViewRes.rc > Cursor
- Add Resource...
- Import...
- Select toolstuff.cur
- Edit the cursor using Visual Studio bitmap tools
- Open Properties view
- Click on name IDC_CURSOR_6
- Rename to "TOOLSTUFF"
- Link to Windows code
- Add to llwindowwin32.cpp, LLWindowWin32::initCursors()
- mCursor[UI_CURSOR_TOOLSTUFF] = loadColorCursor(TEXT("TOOLSTUFF"));
Mac
- Create art for Mac
- indra/newview/cursors_mac
- duplicate UI_CURSOR_TOOLOPEN.tif
- Save cursor as 32-bit TIFF
- Link to Mac code
- Edit llwindowmacosx.cpp cursorIDToName()
- Add "UI_CURSOR_TOOLSTUFF"
Linux
- Create art for Linux
- indra/newview/res_sdl
- duplicate toolopen.BMP
- save as 24-bit BMP
- Alpha is color-keyed to 200, 200, 200
- Link to code
- Edit llwindowsdl.cpp LLWindowSDL::initCursors()
- mSDLCursors[UI_CURSOR_TOOLPLAY] = makeSDLCursorFromBMP("toolplay.BMP",0,0);
- Hot-spot is hard-coded in above function call