Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

How to determine if (remote) sensor is visible? #68

@originalfoo

Description

@originalfoo

Hi,

I've just written my first sensor mod (github) for EvoGUI and in the on-tick handler I was thinking how nice it would be to have some way to know whether the sensor is currently displayed or not (otherwise, no point in updating the sensor data). This may already be possible (let me know if it is) but I've only just scratched the surface of the Evo codebase and didn't see anything yet.

Maybe Evo could register custom event, 'sensor-toggle' - mods get the numeric event id via remote API and hook to the event. When sensor is shown/hidden, the event fires with a table payload such as:

{ event = 'sensor-toggle', sensor = '<sensor-name>', active = true|false }

That way I can set a local variable when the event fires, and in my on-tick handler rapidly exit out if the sensor is not currently visible.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions