evaera / Cmdr

Extensible command console for Roblox developers
https://eryn.io/Cmdr/
MIT License
363 stars 104 forks source link

Add client-side events to allow developers to integrate external systems into Cmdr #310

Open Rythian2277 opened 1 year ago

Rythian2277 commented 1 year ago

I propose adding the following event to the client (with a framework to add more in future):

This event would allow for developers to let their game systems, especially their UI, behave appropriately with the Cmdr client.

Example of implementation (but can 100% be done better)

https://github.com/evaera/Cmdr/compare/master...Rythian2277:Cmdr:master

autonordev commented 1 year ago

FWIW this could be currently done by pulling PlayerGui.Cmdr (I think there's also a member within the API to get the screengui?) and adding an event listener to the window's Visible property

I do agree in principle that we need to make it easier for developers to integrate external systems and 'plug into' Cmdr, especially on the client. Currently a lot of stuff relies on private members (which aren't covered by our API contract, so could be broken in patches) or are non-determinate (like PlayerGui.Cmdr)