Skip to content

feat : add rmouse module for mouse click/double-click/drag detection - #9

Open
Autumnker wants to merge 2 commits into
raylib-extras:mainfrom
Autumnker:feat/rmouse
Open

feat : add rmouse module for mouse click/double-click/drag detection#9
Autumnker wants to merge 2 commits into
raylib-extras:mainfrom
Autumnker:feat/rmouse

Conversation

@Autumnker

Copy link
Copy Markdown

Summary

Add rmouse — a zero-latency mouse click / double-click / drag detection module for raylib.

What's Included

New files

  • rmouse/rmouse.h — Single-header C library providing:
    • Click detection (fires immediately on release, Windows-style)
    • Double-click detection with automatic click suppression (mutual exclusion)
    • Drag detection with per-frame delta accumulation
    • Left and right button tracking via RMouse struct
  • rmouse/samples/rmouse_example.c — Interactive demo:
    • Click to darken / double-click to cycle colour on a draggable rectangle
    • Drag to move the rectangle
    • On-screen event log

Modified files

  • premake5.lua — Registered rmouse_example as a ConsoleApp build target under the Examples group (no static lib needed — header-only).

How to Build

.\premake-mingw.bat          # or premake-VisualStudio.bat
mingw32-make rmouse_example  # build just the example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant