Stop exposing Pointer_SetPressed, as it is only supposed to be called from within Input.c so state remains consistent

This commit is contained in:
UnknownShadow200 2020-12-13 18:34:48 +11:00
parent 4f4a20e8ac
commit 155e375f94
3 changed files with 4 additions and 4 deletions

View File

@ -33,6 +33,8 @@ static float input_fovIndex = -1.0f;
static cc_bool suppressEscape;
#endif
enum MouseButton_ { MOUSE_LEFT, MOUSE_RIGHT, MOUSE_MIDDLE };
/* Raises PointerEvents.Up or PointerEvents.Down */
static void Pointer_SetPressed(int idx, cc_bool pressed);
/*########################################################################################################################*

View File

@ -94,11 +94,9 @@ void Input_RemoveTouch(long id, int x, int y);
/* Data for mouse and touch */
extern struct Pointer { int x, y; } Pointers[INPUT_MAX_POINTERS];
/* X and Y coordinates of the mouse. Use Mouse_SetPosition to change. */
/* (OBSOLETE) X and Y coordinates of the mouse. Use Mouse_SetPosition to change. */
extern int Mouse_X, Mouse_Y;
/* Raises PointerEvents.Up or PointerEvents.Down. */
void Pointer_SetPressed(int idx, cc_bool pressed);
/* Raises InputEvents.Wheel with the given wheel delta. */
void Mouse_ScrollWheel(float delta);
/* Sets X and Y position of the given pointer, always raising PointerEvents.Moved. */

View File

@ -3767,11 +3767,11 @@ static void TouchOnscreenScreen_Init(void* screen) {
s->numWidgets = Array_Elems(touchOnscreen_widgets);
s->maxVertices = TOUCHONSCREEN_MAX_VERTICES;
TouchOnscreen_UpdateColors(screen);
Menu_InitBack(&s->back, TouchOnscreen_More);
ButtonWidget_Init(&s->left, 40, TouchOnscreen_Left);
ButtonWidget_Init(&s->right, 40, TouchOnscreen_Right);
TouchOnscreen_SetPage(s, true);
TouchOnscreen_UpdateColors(screen);
}
static const struct ScreenVTABLE TouchOnscreenScreen_VTABLE = {