0xFEEDC0DE64 / esp-gui-lib

ESP32 gui library
GNU General Public License v3.0
2 stars 1 forks source link

[Feature] Implement ConditionInterface #6

Open CommanderRedYT opened 2 years ago

CommanderRedYT commented 2 years ago

This would be really useful to make menus more clear.

class WiFiStaConnectedCondition : public espgui::ConditionInterface {
    bool visible() override {
        return wifi_stack::get_sta_status() == wifi_stack::WiFiStaStatus::CONNECTED;
    }
}

With this, some MenuItems like OTA-Related-Menus for example could be hidden if the functions are not available. This could really enhance user experience.