Moerill / fvtt-pointer

MIT License
6 stars 16 forks source link

[FEATURE] expose additional interface parameters #11

Open thomasmckay opened 3 years ago

thomasmckay commented 3 years ago

Is your feature request related to a problem? Please describe. Calling canvas.controls.pointer.ping() from within another module (or script), would benefit from exposing all the graphical parameters (ie. overriding the params associated with userId).

My use case is that I want to script pings of varying color, duration, and styling not associated with a specific user's settings.

Describe the solution you'd like Extend ping() with optional override params.

Describe alternatives you've considered Adjusting user's settings, firing ping, the resetting back to original.

Additional context Happy to contribute, either by opening PR myself or reviewing one.

Moerill commented 3 years ago

Just to make sure i understand it correctly: You want to be able to overwrite parameters of the ping itself, like the texture, size, ..., when calling the ping() function?

So.. the texture should have a signature like this: ping( {texture, color, scale, ...}) ?

This would be not possible the way its currently implemented, but it could be worth the small rewrite :thinking: and using e.g. macros could be used to solve https://github.com/Moerill/fvtt-pointer/issues/5 as well

thomasmckay commented 3 years ago

Correct. Effectively I'd like to create ping-like objects strictly through API, not limited to the user's settings.

Moerill commented 3 years ago

Do you have anything specific in mind for this? or do you just want the flexibility of having different kind of pings available for different usecases? Asking cause the above change would still limit you to having only 1 ping per player active. And i'm not sure if i want to remove that limitation. (To avoid spamming to much)

thomasmckay commented 3 years ago

One per player is fine. The players interact with pings via my script and use different colors, etc. to indicate intentions (heal, give advantage, etc.).