1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

Improve documentation of eframe, especially for wasm32 (#3295)

* Improve documentation of `eframe`, especially for wasm32

* remove dead code

* fix
This commit is contained in:
Emil Ernerfeldt
2023-09-04 09:55:47 +02:00
committed by GitHub
parent 209cbeb030
commit 5f742b9aba
12 changed files with 69 additions and 61 deletions

View File

@@ -1,3 +1,4 @@
/// Screen reader support.
pub struct ScreenReader {
#[cfg(feature = "tts")]
tts: Option<tts::Tts>,
@@ -29,10 +30,12 @@ impl Default for ScreenReader {
}
impl ScreenReader {
/// Speak the given text out loud.
#[cfg(not(feature = "tts"))]
#[allow(clippy::unused_self)]
pub fn speak(&mut self, _text: &str) {}
/// Speak the given text out loud.
#[cfg(feature = "tts")]
pub fn speak(&mut self, text: &str) {
if text.is_empty() {