Difference between revisions of "love.mouse.newCursor (한국어)"
(Created page with "{{newin|0.9.0|090|type=function}} Creates a new hardware Cursor object from an image file or ImageData. Hardware cursors are framerate-independent and work the same ...") |
m |
||
Line 45: | Line 45: | ||
* [[parent::love.mouse (한국어)]] | * [[parent::love.mouse (한국어)]] | ||
* [[love.mouse.setCursor (한국어)]] | * [[love.mouse.setCursor (한국어)]] | ||
− | * [[Constructs::Cursor]] | + | * [[Constructs::Cursor (한국어)]] |
[[Category:Functions]] | [[Category:Functions]] | ||
{{#set:Description=Creates a new hardware [[Cursor]] object from an image.}} | {{#set:Description=Creates a new hardware [[Cursor]] object from an image.}} | ||
== 다른 언어 == | == 다른 언어 == | ||
{{i18n|love.mouse.newCursor}} | {{i18n|love.mouse.newCursor}} |
Revision as of 18:05, 15 January 2014
Available since LÖVE 0.9.0 |
This function is not supported in earlier versions. |
Creates a new hardware Cursor object from an image file or ImageData.
Hardware cursors are framerate-independent and work the same way as normal operating system cursors. Unlike drawing an image at the mouse's current coordinates, hardware cursors never have visible lag between when the mouse is moved and when the cursor position updates, even at low framerates.
The hot spot is the point the operating system uses to determine what was clicked and at what position the mouse cursor is. For example, the normal arrow pointer normally has its hot spot at the top left of the image, but a crosshair cursor might have it in the middle.
This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused! |
Contents
함수
형식
cursor = love.mouse.newCursor( imageData, hotx, hoty )
매개변수
ImageData (한국어) imageData
- The ImageData to use for the new Cursor.
number (한국어) hotx (0)
- The x-coordinate in the ImageData of the cursor's hot spot.
number (한국어) hoty (0)
- The y-coordinate in the ImageData of the cursor's hot spot.
리턴값
Cursor (한국어) cursor
- The new Cursor object.
함수
형식
cursor = love.mouse.newCursor( filename, hotx, hoty )
매개변수
string (한국어) filename
- Path to the image to use for the new Cursor.
number (한국어) hotx (0)
- The x-coordinate in the image of the cursor's hot spot.
number (한국어) hoty (0)
- The y-coordinate in the image of the cursor's hot spot.
리턴값
Cursor (한국어) cursor
- The new Cursor object.
함수
형식
cursor = love.mouse.newCursor( fileData, hotx, hoty )
매개변수
FileData (한국어) fileData
- Data representing the image to use for the new Cursor.
number (한국어) hotx (0)
- The x-coordinate in the image of the cursor's hot spot.
number (한국어) hoty (0)
- The y-coordinate in the image of the cursor's hot spot.
리턴값
Cursor (한국어) cursor
- The new Cursor object.
같이 보기
다른 언어
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info