Skip to content

Add Mouse Input API and test widget#8053

Draft
WybrenKoelmans wants to merge 1 commit into
beyond-all-reason:masterfrom
WybrenKoelmans:mouse-api
Draft

Add Mouse Input API and test widget#8053
WybrenKoelmans wants to merge 1 commit into
beyond-all-reason:masterfrom
WybrenKoelmans:mouse-api

Conversation

@WybrenKoelmans

Copy link
Copy Markdown
Contributor

Introduce a Mouse Input API along with a test widget to handle various mouse events such as clicks, double-clicks, and drags. This addition enhances interaction capabilities and provides a framework for further development of mouse-related functionalities.

@github-actions

Copy link
Copy Markdown
Contributor

Integration Test Results

15 tests  ±0   6 ✅ ±0   3s ⏱️ ±0s
 1 suites ±0   8 💤 ±0 
 1 files   ±0   1 ❌ ±0 

For more details on these failures, see this check.

Results for commit 53b55fc. ± Comparison against base commit cbe4b9c.

@WybrenKoelmans

Copy link
Copy Markdown
Contributor Author

https://discord.com/channels/549281623154229250/724293659809284137/1518316407522070599

Sprung:

my vision of how to approach this would be

  • figure out what is needed to replicate engine behaviours, e.g. maybe for drag selection you'll need some spSelectUnitsInScreenRectangle. implement those
  • using the above, provide widget implementations to those behaviours and put them in basecontent
  • make the engine not consume any mouseclicks at all, such that gameside lua is the only client and can design the behaviour ("claiming ownership" and whatever else) any way it likes

i think the native gui (build menu, sharedialog etc) are fine not to reimplement
just selection, dragging, rightclick etc

the 2nd and 3rd steps in my list are technically not needed, in that if a game's lua always claims mouse it can already do anything it wants
just more annoying to work with probably since mouse is permaclaimed

This is offered as a reference, I will not work on this in the near future.

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