Page 1 of 1

what is the biggest size of cursor

Posted: Mon Mar 22, 2010 20:46
by lw89
hi everyone:

I want try create a large cursor like a hand, what is the biggest size of a cursor in CEGUI. and do i need create a new skin or create a new cursor in VS2009

Re: what is the biggest size of cursor

Posted: Tue Mar 23, 2010 11:41
by CrazyEddie
The cursor in CEGUI is a software cursor and it's size is limited only by the max texture size supported by the video card. An entire new skin is not needed, just define a new imageset that describes the image and use that to set the imageset and image name for the cursor. This can be done via XML or by loading the image directly:

XML:

Code: Select all

<?xml version="1.0" ?>
<Imageset Name="CursorsImageset" Imagefile="cursor_image.tga" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true">
   <Image Name="TheHand" XPos="0" YPos="0" Width="150" Height="150" />
</Imageset>

You then load this imageset via the ImagesetManager or specify it in your scheme XML file.

Directly:

Code: Select all

CEGUI::ImagesetManager::getSingleton().createFromImageFile("CursorsImageset", "cursor_image.tga");


Note when doing it using the direct code method, you get a single image automatically defined named 'full_image', which you can then use to specify the entire image you loaded, for example:

Code: Select all

CEGUI::System::getSingleton().setDefaultMouseCursor( "CursorsImageset", "full_image" );


CE

Re: what is the biggest size of cursor

Posted: Wed Jan 05, 2011 12:13
by princefarr
Well, From my point of view, SM_CXCURSOR by SM_CYCURSOR is the only cursor size the system can currently use. Use GetSystemMetrics to find out those values.