[Feature] Implement ConditionInterface #6

Open
opened 2022-01-21 15:33:39 +01:00 by CommanderRedYT · 0 comments
CommanderRedYT commented 2022-01-21 15:33:39 +01:00 (Migrated from github.com)

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.

This would be really useful to make menus more clear. ```cpp 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: feedc0de/esp-gui-lib#6
No description provided.