refactor: improve capsulation and safety of tui module public api

This commit is contained in:
CJ van den Berg 2025-01-23 16:45:04 +01:00
parent 4145460012
commit 1d947ab499
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
28 changed files with 239 additions and 198 deletions

View file

@ -33,11 +33,11 @@ pub fn layout(_: *void, btn: *Button.State(void)) Widget.Layout {
}
fn is_mini_mode() bool {
return tui.current().mini_mode != null;
return tui.mini_mode() != null;
}
fn is_overlay_mode() bool {
return tui.current().input_mode_outer != null;
return tui.input_mode_outer() != null;
}
pub fn render(_: *void, self: *Button.State(void), theme: *const Widget.Theme) bool {