PDA

View Full Version : Masking/UnMasking areas with no cursor input



Ken L
December 3rd, 2017, 20:03
This is a real cookie here. As far as the exposed Ruleset API goes, there's only:

getMaskTool
hasMask
onMaskingStateChanged
setMaskEnabled
setMaskTool

Under ImageControl.

Now some of us are familiar with Steve Melton's (smelton) prototype FoW extension that created a pseudo dynamic lighting by automating Masking/Unmasking. I currently find myself in need of the ability to mask/unmask without cursor input, and Smelton's extension clearly did that... But how? I simply don't see handlers to enable that, or am I missing something?

Moon Wizard
December 3rd, 2017, 21:47
I think he actually built a grid of controls overlaying the image control dynamically. There is no direct access to the mask data.

Cheers,
JPG

Ken L
December 3rd, 2017, 22:33
Ah, it makes sense now, especially with the grayed out area, a series of Images or widgets stretched to overlay the grid. That's actually very doable combined with his moving tokens via clicking on the area. My goal here was to create a pseudo polygon FoW tool since I was getting tired of the crappy free-draw.

And so ends my extension sprint this weekend.