diff --git a/engine/src/passes/blur.rs b/engine/src/passes/blur.rs index d1f0466b..4d19272f 100644 --- a/engine/src/passes/blur.rs +++ b/engine/src/passes/blur.rs @@ -6,7 +6,7 @@ use wgpu::{ use crate::{CompiledModule, Encoders, GfxContext, PipelineBuilder, Texture, TextureBuilder, TL}; -const DOWNSCALE_PASSES: u32 = 3; +const DOWNSCALE_PASSES: u32 = 2; /// The blur pass to be used by the UI uses the "Dual Kawase Blur" algorithm as explained /// in the SIGGRAPH 2015 paper "Bandwidth-efficient Rendering" by Marius Bjørge diff --git a/native_app/src/gui/mod.rs b/native_app/src/gui/mod.rs index 3c5bde22..009c4d47 100644 --- a/native_app/src/gui/mod.rs +++ b/native_app/src/gui/mod.rs @@ -14,23 +14,16 @@ use simulation::map::BuildingID; use simulation::world_command::WorldCommand; use simulation::{AnyEntity, Simulation}; -pub mod addtrain; -pub mod bulldozer; pub mod chat; pub mod follow; pub mod inspect; pub mod inspected_aura; -pub mod lotbrush; -pub mod roadbuild; -pub mod roadeditor; -pub mod selectable; -pub mod specialbuilding; -pub mod terraforming; +mod tools; pub mod topgui; pub mod windows; -pub mod zoneedit; pub use follow::FollowEntity; +pub use tools::*; pub use topgui::*; pub fn run_ui_systems(sim: &Simulation, uiworld: &mut UiWorld) { diff --git a/native_app/src/gui/addtrain.rs b/native_app/src/gui/tools/addtrain.rs similarity index 97% rename from native_app/src/gui/addtrain.rs rename to native_app/src/gui/tools/addtrain.rs index ca2a24de..9e72acf0 100644 --- a/native_app/src/gui/addtrain.rs +++ b/native_app/src/gui/tools/addtrain.rs @@ -1,5 +1,4 @@ -use super::Tool; -use crate::gui::PotentialCommands; +use crate::gui::{PotentialCommands, Tool}; use crate::inputmap::{InputAction, InputMap}; use crate::rendering::immediate::ImmediateDraw; use crate::uiworld::UiWorld; diff --git a/native_app/src/gui/bulldozer.rs b/native_app/src/gui/tools/bulldozer.rs similarity index 99% rename from native_app/src/gui/bulldozer.rs rename to native_app/src/gui/tools/bulldozer.rs index 17271a41..ccd0b74b 100644 --- a/native_app/src/gui/bulldozer.rs +++ b/native_app/src/gui/tools/bulldozer.rs @@ -1,5 +1,5 @@ -use super::Tool; use crate::gui::specialbuilding::SpecialBuildingResource; +use crate::gui::Tool; use crate::inputmap::{InputAction, InputMap}; use crate::rendering::immediate::ImmediateDraw; use crate::uiworld::UiWorld; diff --git a/native_app/src/gui/lotbrush.rs b/native_app/src/gui/tools/lotbrush.rs similarity index 98% rename from native_app/src/gui/lotbrush.rs rename to native_app/src/gui/tools/lotbrush.rs index 519c2111..ee70cc08 100644 --- a/native_app/src/gui/lotbrush.rs +++ b/native_app/src/gui/tools/lotbrush.rs @@ -1,4 +1,4 @@ -use super::Tool; +use crate::gui::Tool; use crate::inputmap::{InputAction, InputMap}; use crate::rendering::immediate::ImmediateDraw; use crate::uiworld::UiWorld; diff --git a/native_app/src/gui/tools/mod.rs b/native_app/src/gui/tools/mod.rs new file mode 100644 index 00000000..c695af9f --- /dev/null +++ b/native_app/src/gui/tools/mod.rs @@ -0,0 +1,9 @@ +pub mod addtrain; +pub mod bulldozer; +pub mod lotbrush; +pub mod roadbuild; +pub mod roadeditor; +pub mod selectable; +pub mod specialbuilding; +pub mod terraforming; +pub mod zoneedit; diff --git a/native_app/src/gui/roadbuild.rs b/native_app/src/gui/tools/roadbuild.rs similarity index 100% rename from native_app/src/gui/roadbuild.rs rename to native_app/src/gui/tools/roadbuild.rs diff --git a/native_app/src/gui/roadeditor.rs b/native_app/src/gui/tools/roadeditor.rs similarity index 100% rename from native_app/src/gui/roadeditor.rs rename to native_app/src/gui/tools/roadeditor.rs diff --git a/native_app/src/gui/selectable.rs b/native_app/src/gui/tools/selectable.rs similarity index 100% rename from native_app/src/gui/selectable.rs rename to native_app/src/gui/tools/selectable.rs diff --git a/native_app/src/gui/specialbuilding.rs b/native_app/src/gui/tools/specialbuilding.rs similarity index 99% rename from native_app/src/gui/specialbuilding.rs rename to native_app/src/gui/tools/specialbuilding.rs index 8c9f97fb..733c16b4 100644 --- a/native_app/src/gui/specialbuilding.rs +++ b/native_app/src/gui/tools/specialbuilding.rs @@ -1,5 +1,4 @@ -use super::Tool; -use crate::gui::{ErrorTooltip, InspectedBuilding, PotentialCommands}; +use crate::gui::{ErrorTooltip, InspectedBuilding, PotentialCommands, Tool}; use crate::inputmap::{InputAction, InputMap}; use crate::rendering::immediate::{ImmediateDraw, ImmediateSound}; use crate::uiworld::UiWorld; diff --git a/native_app/src/gui/terraforming.rs b/native_app/src/gui/tools/terraforming.rs similarity index 99% rename from native_app/src/gui/terraforming.rs rename to native_app/src/gui/tools/terraforming.rs index 98d20c3b..684c7c4b 100644 --- a/native_app/src/gui/terraforming.rs +++ b/native_app/src/gui/tools/terraforming.rs @@ -1,4 +1,4 @@ -use super::Tool; +use crate::gui::Tool; use crate::inputmap::{InputAction, InputMap}; use crate::rendering::immediate::ImmediateDraw; use crate::uiworld::UiWorld; diff --git a/native_app/src/gui/zoneedit.rs b/native_app/src/gui/tools/zoneedit.rs similarity index 100% rename from native_app/src/gui/zoneedit.rs rename to native_app/src/gui/tools/zoneedit.rs diff --git a/native_app/src/newgui/topgui.rs b/native_app/src/newgui/topgui.rs index d9283e39..82b169b4 100644 --- a/native_app/src/newgui/topgui.rs +++ b/native_app/src/newgui/topgui.rs @@ -1,5 +1,5 @@ use ordered_float::OrderedFloat; -use yakui::widgets::{CutOut, List, Pad}; +use yakui::widgets::{List, Pad}; use yakui::{ constrained, reflow, row, spacer, Alignment, Color, Constraints, CrossAxisAlignment, Dim2, MainAxisAlignment, MainAxisSize, Vec2,