|
|
|
@ -72,9 +72,7 @@ fn init_debug_ui(mut commands: Commands) {
|
|
|
|
DebuggingState::On,
|
|
|
|
DebuggingState::On,
|
|
|
|
Name::new("Debug Indicator"),
|
|
|
|
Name::new("Debug Indicator"),
|
|
|
|
GlobalZIndex(i32::MAX - 1),
|
|
|
|
GlobalZIndex(i32::MAX - 1),
|
|
|
|
children![
|
|
|
|
children![Text(" Debug: ON ".into()),],
|
|
|
|
Text(" Debug: ON ".into()),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
Node {
|
|
|
|
Node {
|
|
|
|
align_self: AlignSelf::Center,
|
|
|
|
align_self: AlignSelf::Center,
|
|
|
|
justify_self: JustifySelf::End,
|
|
|
|
justify_self: JustifySelf::End,
|
|
|
|
@ -86,9 +84,7 @@ fn init_debug_ui(mut commands: Commands) {
|
|
|
|
commands.spawn((
|
|
|
|
commands.spawn((
|
|
|
|
DebuggingState::On,
|
|
|
|
DebuggingState::On,
|
|
|
|
Name::new("Version #"),
|
|
|
|
Name::new("Version #"),
|
|
|
|
children![
|
|
|
|
children![Text::new(VERSION),],
|
|
|
|
Text::new(VERSION),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
GlobalZIndex(i32::MAX - 1),
|
|
|
|
GlobalZIndex(i32::MAX - 1),
|
|
|
|
Node {
|
|
|
|
Node {
|
|
|
|
width: Val::Auto,
|
|
|
|
width: Val::Auto,
|
|
|
|
@ -99,62 +95,65 @@ fn init_debug_ui(mut commands: Commands) {
|
|
|
|
));
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
// Version string for troubleshooting
|
|
|
|
// Version string for troubleshooting
|
|
|
|
commands.spawn((
|
|
|
|
commands
|
|
|
|
DebuggingState::On,
|
|
|
|
.spawn((
|
|
|
|
Name::new("FPS"),
|
|
|
|
DebuggingState::On,
|
|
|
|
GlobalZIndex(i32::MAX - 1),
|
|
|
|
Name::new("FPS"),
|
|
|
|
Node {
|
|
|
|
GlobalZIndex(i32::MAX - 1),
|
|
|
|
width: Val::Auto,
|
|
|
|
Node {
|
|
|
|
align_self: AlignSelf::Start,
|
|
|
|
width: Val::Auto,
|
|
|
|
justify_self: JustifySelf::End,
|
|
|
|
align_self: AlignSelf::Start,
|
|
|
|
..default()
|
|
|
|
justify_self: JustifySelf::End,
|
|
|
|
},
|
|
|
|
..default()
|
|
|
|
)).with_children(|parent| {
|
|
|
|
},
|
|
|
|
parent.spawn((
|
|
|
|
))
|
|
|
|
Text::new("FPS: ##.#"),
|
|
|
|
.with_children(|parent| {
|
|
|
|
SyncResource::<Fps>::default(),
|
|
|
|
parent.spawn((Text::new("FPS: ##.#"), SyncResource::<Fps>::default()));
|
|
|
|
));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
commands.spawn((
|
|
|
|
commands
|
|
|
|
DebuggingState::On,
|
|
|
|
.spawn((
|
|
|
|
Name::new("Entity Count"),
|
|
|
|
DebuggingState::On,
|
|
|
|
GlobalZIndex(i32::MAX - 1),
|
|
|
|
Name::new("Entity Count"),
|
|
|
|
Node {
|
|
|
|
GlobalZIndex(i32::MAX - 1),
|
|
|
|
width: Val::Auto,
|
|
|
|
Node {
|
|
|
|
align_self: AlignSelf::Start,
|
|
|
|
width: Val::Auto,
|
|
|
|
justify_self: JustifySelf::Center,
|
|
|
|
align_self: AlignSelf::Start,
|
|
|
|
..default()
|
|
|
|
justify_self: JustifySelf::Center,
|
|
|
|
},
|
|
|
|
..default()
|
|
|
|
)).with_children(|parent| {
|
|
|
|
},
|
|
|
|
parent.spawn((
|
|
|
|
))
|
|
|
|
Text::new("Entities: ###"),
|
|
|
|
.with_children(|parent| {
|
|
|
|
SyncResource::<EntityCount>::default(),
|
|
|
|
parent.spawn((
|
|
|
|
));
|
|
|
|
Text::new("Entities: ###"),
|
|
|
|
});
|
|
|
|
SyncResource::<EntityCount>::default(),
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// Tooltip
|
|
|
|
// Tooltip
|
|
|
|
commands.spawn((
|
|
|
|
commands
|
|
|
|
DebuggingState::On,
|
|
|
|
.spawn((
|
|
|
|
SyncResource::<ToolTip>::default(),
|
|
|
|
DebuggingState::On,
|
|
|
|
Pickable::IGNORE,
|
|
|
|
SyncResource::<ToolTip>::default(),
|
|
|
|
GlobalZIndex(i32::MAX),
|
|
|
|
Pickable::IGNORE,
|
|
|
|
Node {
|
|
|
|
GlobalZIndex(i32::MAX),
|
|
|
|
position_type: PositionType::Absolute,
|
|
|
|
Node {
|
|
|
|
margin: UiRect {
|
|
|
|
position_type: PositionType::Absolute,
|
|
|
|
left: Val::Px(20.0),
|
|
|
|
margin: UiRect {
|
|
|
|
|
|
|
|
left: Val::Px(20.0),
|
|
|
|
|
|
|
|
..default()
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
align_content: AlignContent::Center,
|
|
|
|
|
|
|
|
justify_content: JustifyContent::Center,
|
|
|
|
..default()
|
|
|
|
..default()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
align_content: AlignContent::Center,
|
|
|
|
))
|
|
|
|
justify_content: JustifyContent::Center,
|
|
|
|
.with_children(|parent| {
|
|
|
|
..default()
|
|
|
|
parent.spawn((
|
|
|
|
},
|
|
|
|
Text("Tooltip Placeholder".into()),
|
|
|
|
)).with_children(|parent| {
|
|
|
|
SyncResource::<ToolTip>::default(),
|
|
|
|
parent.spawn((
|
|
|
|
));
|
|
|
|
Text("Tooltip Placeholder".into()),
|
|
|
|
});
|
|
|
|
SyncResource::<ToolTip>::default(),
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Toggles the debug state from off -> on // off -> on when triggered
|
|
|
|
/// Toggles the debug state from off -> on // off -> on when triggered
|
|
|
|
|