update px dependent on resize + move painter data into struct in ui
This commit is contained in:
1 parent
61df088cc7
commit
c98a43f94d
7 files changed
+99
-105
No files matched your search
+3
-1
@@ -55,7 +55,8 @@ impl<W: WidgetLike<Tag>, Tag> Eventable<W::Widget, Tag> for W {
|
||||
) -> impl WidgetIdFn<W::Widget> {
|
||||
move |ui| {
|
||||
let id = self.add(ui);
|
||||
ui.modules
|
||||
ui.data
|
||||
.modules
|
||||
.get_mut::<E::Module<Ctx>>()
|
||||
.register(id.id, event, f);
|
||||
id
|
||||
@@ -180,6 +181,7 @@ impl Ui {
|
||||
) {
|
||||
if let Some(f) = ctx
|
||||
.ui()
|
||||
.data
|
||||
.modules
|
||||
.get_mut::<E::Module<Ctx>>()
|
||||
.run(&id.id, event)
|
||||
|
||||
Reference in new issue
Block a user