+
diff --git a/dash-frontend/assets/gui/tab/welcome_common.xml b/dash-frontend/assets/gui/tab/welcome_common.xml
new file mode 100644
index 00000000..97a8134c
--- /dev/null
+++ b/dash-frontend/assets/gui/tab/welcome_common.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/dash-frontend/assets/gui/tab/welcome_page_1.xml b/dash-frontend/assets/gui/tab/welcome_page_1.xml
index c7fa5d71..b748d578 100644
--- a/dash-frontend/assets/gui/tab/welcome_page_1.xml
+++ b/dash-frontend/assets/gui/tab/welcome_page_1.xml
@@ -1,5 +1,14 @@
+
+
-
+
diff --git a/dash-frontend/assets/gui/tab/welcome_page_2.xml b/dash-frontend/assets/gui/tab/welcome_page_2.xml
index e25b5249..cc43df4b 100644
--- a/dash-frontend/assets/gui/tab/welcome_page_2.xml
+++ b/dash-frontend/assets/gui/tab/welcome_page_2.xml
@@ -1,5 +1,19 @@
+
+
-
+
diff --git a/dash-frontend/assets/video/onboarding_double_press.ivf b/dash-frontend/assets/video/onboarding_double_press.ivf
new file mode 100644
index 00000000..38ebfc75
Binary files /dev/null and b/dash-frontend/assets/video/onboarding_double_press.ivf differ
diff --git a/dash-frontend/assets/video/onboarding_laser_colors.ivf b/dash-frontend/assets/video/onboarding_laser_colors.ivf
new file mode 100644
index 00000000..750ede45
Binary files /dev/null and b/dash-frontend/assets/video/onboarding_laser_colors.ivf differ
diff --git a/dash-frontend/src/tab/welcome.rs b/dash-frontend/src/tab/welcome.rs
index 6be85825..a884d9eb 100644
--- a/dash-frontend/src/tab/welcome.rs
+++ b/dash-frontend/src/tab/welcome.rs
@@ -30,6 +30,8 @@ pub struct TabWelcome
{
current_page: u8,
id_pips: WidgetID,
id_content: WidgetID,
+
+ state_tab: Option,
}
const PAGE_COUNT: u8 = 5; // 0-4 inclusive
@@ -94,6 +96,7 @@ impl TabWelcome {
id_pips,
id_content,
tasks,
+ state_tab: None,
})
}
@@ -120,7 +123,7 @@ impl TabWelcome {
let globals = layout.state.globals.clone();
- let _ = wgui::parser::parse_from_assets(
+ self.state_tab = Some(wgui::parser::parse_from_assets(
&ParseDocumentParams {
globals,
path: AssetPath::BuiltIn(&format!("gui/tab/welcome_page_{}.xml", self.current_page)),
@@ -128,7 +131,7 @@ impl TabWelcome {
},
layout,
self.id_content,
- )?;
+ )?);
Ok(())
}
diff --git a/wgui/src/parser/mod.rs b/wgui/src/parser/mod.rs
index f17fc256..432b4f03 100644
--- a/wgui/src/parser/mod.rs
+++ b/wgui/src/parser/mod.rs
@@ -586,6 +586,10 @@ impl ParserContext<'_> {
Some(val / 100.0)
}
+ pub fn parse_auto(value: &str) -> bool {
+ value.contains("auto")
+ }
+
fn parse_size_unit(&self, tag_name: &str, key: &str, value: &str) -> Option
where
T: taffy::prelude::FromPercent + taffy::prelude::FromLength,
diff --git a/wgui/src/parser/style.rs b/wgui/src/parser/style.rs
index c0b8d423..13b258bc 100644
--- a/wgui/src/parser/style.rs
+++ b/wgui/src/parser/style.rs
@@ -233,34 +233,51 @@ pub fn parse_style(ctx: &ParserContext<'_>, attribs: &[AttribPair], tag_name: &s
ctx.print_invalid_attrib(tag_name, key, value);
}
},
+ "aspect_ratio" => {
+ if let Some(aspect) = ctx.parse_val(tag_name, key, value) {
+ style.aspect_ratio = Some(aspect);
+ }
+ }
"min_width" => {
if let Some(dim) = ctx.parse_size_unit(tag_name, key, value) {
style.min_size.width = dim;
+ } else if ParserContext::parse_auto(value) {
+ style.min_size.width = taffy::prelude::auto();
}
}
"min_height" => {
if let Some(dim) = ctx.parse_size_unit(tag_name, key, value) {
style.min_size.height = dim;
+ } else if ParserContext::parse_auto(value) {
+ style.min_size.height = taffy::prelude::auto();
}
}
"max_width" => {
if let Some(dim) = ctx.parse_size_unit(tag_name, key, value) {
style.max_size.width = dim;
+ } else if ParserContext::parse_auto(value) {
+ style.max_size.width = taffy::prelude::auto();
}
}
"max_height" => {
if let Some(dim) = ctx.parse_size_unit(tag_name, key, value) {
style.max_size.height = dim;
+ } else if ParserContext::parse_auto(value) {
+ style.max_size.height = taffy::prelude::auto();
}
}
"width" => {
if let Some(dim) = ctx.parse_size_unit(tag_name, key, value) {
style.size.width = dim;
+ } else if ParserContext::parse_auto(value) {
+ style.size.width = taffy::prelude::auto();
}
}
"height" => {
if let Some(dim) = ctx.parse_size_unit(tag_name, key, value) {
style.size.height = dim;
+ } else if ParserContext::parse_auto(value) {
+ style.size.height = taffy::prelude::auto();
}
}
"gap" => {