summaryrefslogtreecommitdiff
path: root/client/src/ui.rs
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/ui.rs')
-rw-r--r--client/src/ui.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/ui.rs b/client/src/ui.rs
index 98d8147..92de3c8 100644
--- a/client/src/ui.rs
+++ b/client/src/ui.rs
@@ -19,7 +19,7 @@ use egui::{
Context, Event, ImageData, PointerButton, TextureId, ViewportId, ViewportInfo,
epaint::{ImageDelta, Primitive, Vertex},
};
-use glam::{Affine3A, Mat2, Mat3, Mat4, Vec2, Vec3Swizzles, Vec4Swizzles, vec2, vec4};
+use glam::{Affine3A, Mat2, Mat3, Mat4, Vec2, Vec3, Vec3Swizzles, Vec4Swizzles, vec2, vec4};
use log::{info, warn};
use rand::random;
use std::{
@@ -45,6 +45,8 @@ use wgpu::{
};
use winit::event::MouseButton;
+pub const UI_POSITION_OFFSET: f32 = 1000.;
+
pub struct UiRenderer {
device: Arc<Device>,
queue: Arc<Queue>,
@@ -334,7 +336,8 @@ impl UiRenderer {
* Mat4::from_mat3a(surf.transform.matrix3)
* Mat4::from_mat3(Mat3::from_mat2(Mat2::from_cols_array(&[
scale, 0., 0., -scale,
- ])));
+ ])))
+ * Mat4::from_translation(-Vec3::new(UI_POSITION_OFFSET, UI_POSITION_OFFSET, 0.));
let screen_size = vec2(
surface_configuration.width as f32,