finished moving out render_state
This commit is contained in:
@@ -3,7 +3,7 @@ use crate::prelude::*;
|
||||
|
||||
// these methods should "not require any context" (require unit) because they're in core
|
||||
widget_trait! {
|
||||
pub trait CoreWidget<Rsc: HasUi + 'static>;
|
||||
pub trait CoreWidget<Rsc: UiRsc + 'static>;
|
||||
|
||||
fn pad(self, padding: impl Into<Padding>) -> impl WidgetFn<Rsc, Pad> {
|
||||
|state| Pad {
|
||||
@@ -26,7 +26,7 @@ widget_trait! {
|
||||
fn label(self, label: impl Into<String>) -> impl WidgetIdFn<Rsc, WL::Widget> {
|
||||
|state| {
|
||||
let id = self.add(state);
|
||||
state.ui_mut().set_label(id, label.into());
|
||||
state.ui_mut().widgets.set_label(id, label.into());
|
||||
id
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ widget_trait! {
|
||||
|
||||
fn set_ptr(self, ptr: WeakWidget<WidgetPtr>, state: &mut Rsc) {
|
||||
let id = self.add_strong(state);
|
||||
state.ui_mut()[ptr].inner = Some(id);
|
||||
state.ui_mut().widgets[ptr].inner = Some(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user