Skip to content

Commit

Permalink
add DemDoc and change_map
Browse files Browse the repository at this point in the history
  • Loading branch information
khanghugo committed Aug 9, 2024
1 parent 34bfb2c commit 729bc29
Show file tree
Hide file tree
Showing 8 changed files with 403 additions and 15 deletions.
125 changes: 112 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ edition = "2021"
smd = { path = "smd" }
map = { path = "map" }
qc = { path = "qc" }
wad = {path = "wad" }
wad = { path = "wad" }
bsp = { path = "bsp" }
dem = { git = "https://github.com/khanghugo/dem.git" }

# dependencies
glam = "0.27.0"
Expand Down
7 changes: 6 additions & 1 deletion src/gui/pane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ use crate::config::Config;

use super::{
programs::{
map2mdl::Map2MdlGui, s2g::S2GGui, skymod::SkyModGui, textile::TexTileGui, waddy::WaddyGui,
demdoc::DemDoc, map2mdl::Map2MdlGui, s2g::S2GGui, skymod::SkyModGui, textile::TexTileGui,
waddy::WaddyGui,
},
TabProgram,
};
Expand All @@ -15,6 +16,7 @@ pub enum Pane {
SkyMod(SkyModGui),
TexTile(TexTileGui),
Waddy(WaddyGui),
DemDoc(DemDoc),
}

impl Pane {
Expand All @@ -25,6 +27,7 @@ impl Pane {
Pane::SkyMod(skymod) => skymod.tab_title(),
Pane::TexTile(textile) => textile.tab_title(),
Pane::Waddy(a) => a.tab_title(),
Pane::DemDoc(a) => a.tab_title(),
}
}

Expand All @@ -35,6 +38,7 @@ impl Pane {
Pane::SkyMod(skymod) => skymod.tab_ui(ui),
Pane::TexTile(textile) => textile.tab_ui(ui),
Pane::Waddy(a) => a.tab_ui(ui),
Pane::DemDoc(a) => a.tab_ui(ui),
}
}
}
Expand All @@ -48,6 +52,7 @@ pub fn create_tree(app_config: Config) -> egui_tiles::Tree<Pane> {
tiles.insert_pane(Pane::TexTile(TexTileGui::default())),
tiles.insert_pane(Pane::Waddy(WaddyGui::default())),
tiles.insert_pane(Pane::Map2Prop(Map2MdlGui::new(app_config.clone()))),
tiles.insert_pane(Pane::DemDoc(DemDoc::default())),
];

let root = tiles.insert_tab_tile(tabs);
Expand Down
Loading

0 comments on commit 729bc29

Please sign in to comment.