WIP, almost done with tooltips

This commit is contained in:
Mikayla Maki 2022-09-24 08:32:06 -07:00
parent a686a9f1d2
commit d2d49633f1
4 changed files with 138 additions and 18 deletions

View file

@ -36,10 +36,10 @@ struct TooltipState {
#[derive(Clone, Deserialize, Default)]
pub struct TooltipStyle {
#[serde(flatten)]
container: ContainerStyle,
text: TextStyle,
pub container: ContainerStyle,
pub text: TextStyle,
keystroke: KeystrokeStyle,
max_text_width: f32,
pub max_text_width: f32,
}
#[derive(Clone, Deserialize, Default)]
@ -126,7 +126,7 @@ impl Tooltip {
}
}
fn render_tooltip(
pub fn render_tooltip(
text: String,
style: TooltipStyle,
action: Option<Box<dyn Action>>,