瀏覽代碼

ADDED: `GetTouchPointId(index)` #1972

pull/2001/head
raysan5 3 年之前
父節點
當前提交
c96de3a23a
共有 2 個檔案被更改,包括 12 行新增0 行删除
  1. +10
    -0
      src/core.c
  2. +2
    -0
      src/raylib.h

+ 10
- 0
src/core.c 查看文件

@ -3575,6 +3575,16 @@ Vector2 GetTouchPosition(int index)
return position;
}
// Get touch point identifier for given index
int GetTouchPointId(int index)
{
int id = -1;
if (index < MAX_TOUCH_POINTS) id = CORE.Input.Touch.pointId[index];
return id;
}
// Get number of touch points
int GetTouchPointCount(void)
{

+ 2
- 0
src/raylib.h 查看文件

@ -1105,8 +1105,10 @@ RLAPI void SetMouseCursor(int cursor); // Set mouse curso
RLAPI int GetTouchX(void); // Get touch position X for touch point 0 (relative to screen size)
RLAPI int GetTouchY(void); // Get touch position Y for touch point 0 (relative to screen size)
RLAPI Vector2 GetTouchPosition(int index); // Get touch position XY for a touch point index (relative to screen size)
RLAPI int GetTouchPointId(int index); // Get touch point identifier for given index
RLAPI int GetTouchPointCount(void); // Get number of touch points
//------------------------------------------------------------------------------------
// Gestures and Touch Handling Functions (Module: gestures)
//------------------------------------------------------------------------------------

Loading…
取消
儲存