Declare the 12 makepad crate deps once in root [workspace.dependencies] pointing at the gitdab fork rev 4a166606c (which now also carries [workspace.dependencies] into the android wrapper manifest). Member crates switch to workspace = true; 5 non-member workspaces get an inline rev bump. Fix 9 nigig-app script_mod indent errors surfaced by the newer upstream macro parser. The fork rev includes: NIGIG test-mode forwarding, custom AndroidManifest hook, ortho camera support, and the wrapper workspace-deps fix.
48 lines
1.3 KiB
Rust
48 lines
1.3 KiB
Rust
use makepad_widgets::*;
|
|
|
|
script_mod! {
|
|
use mod.prelude.widgets.*
|
|
use mod.widgets.*
|
|
|
|
load_all_resources() do #(ChatStandaloneApp::script_component(vm)) {
|
|
ui: Root {
|
|
main_window := Window {
|
|
window.inner_size: vec2(430, 860)
|
|
window.title: "nigig-chat"
|
|
body +: {
|
|
root := mod.widgets.StandaloneFeatureShell {
|
|
root_screen := mod.widgets.ChatScreen {}
|
|
standalone_bottom_nav := mod.widgets.StandaloneFeatureBottomNav {
|
|
root_nav := mod.widgets.ChatActionBar {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
app_main!(ChatStandaloneApp);
|
|
|
|
#[derive(Script)]
|
|
pub struct ChatStandaloneApp {
|
|
#[live]
|
|
ui: WidgetRef,
|
|
}
|
|
|
|
impl ScriptHook for ChatStandaloneApp {}
|
|
impl MatchEvent for ChatStandaloneApp {}
|
|
|
|
impl AppMain for ChatStandaloneApp {
|
|
fn script_mod(vm: &mut ScriptVm) -> ScriptValue {
|
|
makepad_widgets::theme_mod(vm);
|
|
makepad_widgets::widgets_mod(vm);
|
|
nigig_chat::script_mod(vm);
|
|
self::script_mod(vm)
|
|
}
|
|
|
|
fn handle_event(&mut self, cx: &mut Cx, event: &Event) {
|
|
self.match_event(cx, event);
|
|
self.ui.handle_event(cx, event, &mut Scope::empty());
|
|
}
|
|
}
|