mirror of
https://codeberg.org/icewind/vbspview.git
synced 2026-06-03 18:24:09 +02:00
show position
This commit is contained in:
parent
4eaba16417
commit
d088fc8826
2 changed files with 6 additions and 4 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
|
@ -2321,7 +2321,6 @@ dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"bv",
|
"bv",
|
||||||
"lzma-rs",
|
"lzma-rs",
|
||||||
"miette",
|
|
||||||
"num_enum",
|
"num_enum",
|
||||||
"static_assertions",
|
"static_assertions",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
|
|
|
||||||
|
|
@ -2,19 +2,17 @@ mod camera;
|
||||||
|
|
||||||
use camera::FirstPerson;
|
use camera::FirstPerson;
|
||||||
use itertools::Either;
|
use itertools::Either;
|
||||||
use miette::Diagnostic;
|
|
||||||
use std::env::args;
|
use std::env::args;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
use three_d::*;
|
use three_d::*;
|
||||||
use vbsp::{Bsp, Handle};
|
use vbsp::{Bsp, Handle};
|
||||||
|
|
||||||
#[derive(Debug, Error, Diagnostic)]
|
#[derive(Debug, Error)]
|
||||||
enum Error {
|
enum Error {
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Three(#[from] Box<dyn std::error::Error>),
|
Three(#[from] Box<dyn std::error::Error>),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
#[diagnostic(transparent)]
|
|
||||||
Bsp(#[from] vbsp::BspError),
|
Bsp(#[from] vbsp::BspError),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
IO(#[from] std::io::Error),
|
IO(#[from] std::io::Error),
|
||||||
|
|
@ -134,6 +132,11 @@ fn main() -> Result<(), Error> {
|
||||||
ui.label("View options");
|
ui.label("View options");
|
||||||
ui.add(Slider::new(&mut depth_max, 1.0..=30.0).text("Depth max"));
|
ui.add(Slider::new(&mut depth_max, 1.0..=30.0).text("Depth max"));
|
||||||
ui.add(Slider::new(&mut fov, 45.0..=90.0).text("FOV"));
|
ui.add(Slider::new(&mut fov, 45.0..=90.0).text("FOV"));
|
||||||
|
|
||||||
|
ui.label("Position");
|
||||||
|
ui.add(Label::new(format!("\tx: {}", camera.position().x)));
|
||||||
|
ui.add(Label::new(format!("\ty: {}", camera.position().y)));
|
||||||
|
ui.add(Label::new(format!("\tz: {}", camera.position().z)));
|
||||||
});
|
});
|
||||||
panel_width = gui_context.used_size().x as u32;
|
panel_width = gui_context.used_size().x as u32;
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue