Implemented a ton more things, added BaseApp.h to provide common code to UWP apps.
This commit is contained in:
parent
66293622f9
commit
98e1097364
3 changed files with 437 additions and 505 deletions
|
|
@ -256,6 +256,7 @@ void SetCameraMode(Camera camera, int mode)
|
|||
//cameraAngle.y = -60.0f*DEG2RAD; // Camera angle in plane XY (0 aligned with X, move positive CW)
|
||||
|
||||
playerEyesPosition = camera.position.y;
|
||||
|
||||
|
||||
// Lock cursor for first person and third person cameras
|
||||
if ((mode == CAMERA_FIRST_PERSON) || (mode == CAMERA_THIRD_PERSON)) DisableCursor();
|
||||
|
|
|
|||
14
src/core.c
14
src/core.c
|
|
@ -1018,6 +1018,8 @@ void SetClipboardText(const char *text)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if !defined(PLATFORM_UWP)
|
||||
|
||||
// Show mouse cursor
|
||||
void ShowCursor(void)
|
||||
{
|
||||
|
|
@ -1066,6 +1068,8 @@ void DisableCursor(void)
|
|||
cursorHidden = true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Set background color (framebuffer clear color)
|
||||
void ClearBackground(Color color)
|
||||
{
|
||||
|
|
@ -3090,7 +3094,7 @@ static void PollInputEvents(void)
|
|||
#if defined(PLATFORM_UWP)
|
||||
|
||||
// Register previous keys states
|
||||
for (int i = 0; i < 512; i++)previousKeyState[i] = currentKeyState[i];
|
||||
for (int i = 0; i < 512; i++) previousKeyState[i] = currentKeyState[i];
|
||||
|
||||
// Register previous mouse states
|
||||
previousMouseWheelY = currentMouseWheelY;
|
||||
|
|
@ -4589,7 +4593,7 @@ static void *GamepadThread(void *arg)
|
|||
|
||||
#if defined(PLATFORM_UWP)
|
||||
|
||||
void UWPRegisterKey(int key, int action) {
|
||||
void UWPRegisterKey(int key, char action) {
|
||||
//Convert from virtualKey
|
||||
|
||||
int actualKey = -1;
|
||||
|
|
@ -4672,9 +4676,9 @@ void UWPScrollWheel(int delta) {
|
|||
currentMouseWheelY += delta;
|
||||
}
|
||||
|
||||
void UWPMouseMovement(float x, float y) {
|
||||
mousePosition.x += x;
|
||||
mousePosition.y += y;
|
||||
void UWPMousePosition(float x, float y) {
|
||||
mousePosition.x = x;
|
||||
mousePosition.y = y;
|
||||
}
|
||||
|
||||
void UWPMarkCursor(bool hidden) {
|
||||
|
|
|
|||
12
src/raylib.h
12
src/raylib.h
|
|
@ -914,21 +914,25 @@ RLAPI const char *GetClipboardText(void); // Get clipboa
|
|||
RLAPI void SetClipboardText(const char *text); // Set clipboard text content
|
||||
|
||||
// UWP-related functions
|
||||
#if defined(PLATFORM_UWP)
|
||||
RLAPI void UWPRegisterKey(int key, int action);
|
||||
#if defined(PLATFORM_UWP)
|
||||
|
||||
RLAPI void UWPRegisterKey(int key, char action);
|
||||
RLAPI void UWPRegisterClick(int btn, char action);
|
||||
RLAPI void UWPScrollWheel(int delta);
|
||||
RLAPI void UWPMouseMovement(float x, float y);
|
||||
RLAPI void UWPMousePosition(float x, float y);
|
||||
RLAPI void UWPMarkCursor(bool hidden);
|
||||
//Gamepad functionality?
|
||||
//Gamepad functionality?
|
||||
|
||||
#endif
|
||||
|
||||
// Cursor-related functions
|
||||
#if !defined(PLATFORM_UWP) //These are implemented by BaseApp.h
|
||||
RLAPI void ShowCursor(void); // Shows cursor
|
||||
RLAPI void HideCursor(void); // Hides cursor
|
||||
RLAPI bool IsCursorHidden(void); // Check if cursor is not visible
|
||||
RLAPI void EnableCursor(void); // Enables cursor (unlock cursor)
|
||||
RLAPI void DisableCursor(void); // Disables cursor (lock cursor)
|
||||
#endif
|
||||
|
||||
// Drawing-related functions
|
||||
RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color)
|
||||
|
|
|
|||
Loading…
Reference in a new issue