Rename rectangle module to rect

This commit is contained in:
griffi-gh 2024-03-21 23:22:40 +01:00
parent 99527d0dcb
commit 4574cb8862
21 changed files with 16 additions and 16 deletions

View file

@ -10,7 +10,7 @@ use winit::{
use hui::{ use hui::{
element::{ element::{
container::Container, progress_bar::ProgressBar, fill_rect::FillRect, ElementList, UiElement container::Container, progress_bar::ProgressBar, fill_rect::FillRect, ElementList, UiElement
}, layout::{Alignment, Direction, Size}, rectangle::{Corners, Sides}, UiInstance }, layout::{Alignment, Direction, Size}, rect::{Corners, Sides}, UiInstance
}; };
use hui_glium::GliumUiRenderer; use hui_glium::GliumUiRenderer;

View file

@ -12,7 +12,7 @@ use hui::{
text::Text, ElementList text::Text, ElementList
}, },
layout::{Alignment, Direction, Size}, layout::{Alignment, Direction, Size},
rectangle::{Corners, Sides}, rect::{Corners, Sides},
UiInstance UiInstance
}; };
use hui_glium::GliumUiRenderer; use hui_glium::GliumUiRenderer;

View file

@ -3,7 +3,7 @@ use hui::{
color, size, color, size,
element::{container::Container, progress_bar::ProgressBar, text::Text, UiElementExt}, element::{container::Container, progress_bar::ProgressBar, text::Text, UiElementExt},
layout::Alignment, layout::Alignment,
rectangle::Corners, rect::Corners,
text::FontHandle, text::FontHandle,
}; };

View file

@ -9,7 +9,7 @@ use hui::{
UiElementExt UiElementExt
}, },
layout::Alignment, layout::Alignment,
rectangle::Corners, rect::Corners,
text::FontHandle, text::FontHandle,
size, size,
}; };

View file

@ -2,7 +2,7 @@
#![allow(deprecated)] #![allow(deprecated)]
use glam::{vec4, Vec3, Vec4}; use glam::{vec4, Vec3, Vec4};
use crate::rectangle::Corners; use crate::rect::Corners;
//TODO: use this //TODO: use this
// pub struct Background { // pub struct Background {

View file

@ -3,7 +3,7 @@
//TODO: 9-slice draw command //TODO: 9-slice draw command
use crate::{ use crate::{
rectangle::Corners, rect::Corners,
text::{FontHandle, TextRenderer} text::{FontHandle, TextRenderer}
}; };

View file

@ -2,7 +2,7 @@ use glam::{uvec2, vec2, UVec2, Vec2};
use hashbrown::HashMap; use hashbrown::HashMap;
use nohash_hasher::BuildNoHashHasher; use nohash_hasher::BuildNoHashHasher;
use rect_packer::DensePacker; use rect_packer::DensePacker;
use crate::rectangle::Corners; use crate::rect::Corners;
const RGBA_CHANNEL_COUNT: u32 = 4; const RGBA_CHANNEL_COUNT: u32 = 4;
//TODO make this work //TODO make this work

View file

@ -1,5 +1,5 @@
use std::num::NonZeroU16; use std::num::NonZeroU16;
use crate::rectangle::Corners; use crate::rect::Corners;
//TODO uneven corners (separate width/height for each corner) //TODO uneven corners (separate width/height for each corner)

View file

@ -8,7 +8,7 @@ use crate::{
element::{ElementList, MeasureContext, ProcessContext, UiElement}, element::{ElementList, MeasureContext, ProcessContext, UiElement},
layout::{Alignment, Alignment2d, Direction, LayoutInfo, Size, Size2d}, layout::{Alignment, Alignment2d, Direction, LayoutInfo, Size, Size2d},
measure::{Hints, Response}, measure::{Hints, Response},
rectangle::{Corners, Sides}, rect::{Corners, Sides},
}; };
// pub struct Border { // pub struct Border {

View file

@ -8,7 +8,7 @@ use crate::{
element::{UiElement, MeasureContext, ProcessContext}, element::{UiElement, MeasureContext, ProcessContext},
layout::{Size, Size2d}, layout::{Size, Size2d},
measure::Response, measure::Response,
rectangle::Corners, rect::Corners,
size, size,
}; };

View file

@ -6,7 +6,7 @@ use crate::{
element::{MeasureContext, ProcessContext, UiElement}, element::{MeasureContext, ProcessContext, UiElement},
layout::{compute_size, Size, Size2d}, layout::{compute_size, Size, Size2d},
measure::Response, measure::Response,
rectangle::Corners, rect::Corners,
}; };
#[derive(Setters)] #[derive(Setters)]

View file

@ -6,7 +6,7 @@ use crate::{
element::{MeasureContext, ProcessContext, UiElement}, element::{MeasureContext, ProcessContext, UiElement},
layout::{compute_size, Size, Size2d}, layout::{compute_size, Size, Size2d},
measure::Response, measure::Response,
rectangle::Corners rect::Corners
}; };
#[derive(Debug, Clone, Copy, Setters)] #[derive(Debug, Clone, Copy, Setters)]

View file

@ -8,7 +8,7 @@ use crate::{
element::{MeasureContext, ProcessContext, UiElement}, element::{MeasureContext, ProcessContext, UiElement},
layout::{Size2d, compute_size}, layout::{Size2d, compute_size},
measure::Response, measure::Response,
rectangle::FillColor, rect::FillColor,
signal::{trigger::SignalTriggerArg, Signal}, signal::{trigger::SignalTriggerArg, Signal},
}; };

View file

@ -5,7 +5,7 @@ use glam::Vec2;
use hashbrown::HashMap; use hashbrown::HashMap;
use nohash_hasher::BuildNoHashHasher; use nohash_hasher::BuildNoHashHasher;
use tinyset::{Fits64, Set64}; use tinyset::{Fits64, Set64};
use crate::{event::{EventQueue, UiEvent}, rectangle::Rect}; use crate::{event::{EventQueue, UiEvent}, rect::Rect};
/// Represents a mouse button. /// Represents a mouse button.
/// ///

View file

@ -12,7 +12,7 @@
mod instance; mod instance;
mod macros; mod macros;
pub mod layout; pub mod layout;
pub mod rectangle; pub mod rect;
pub mod background; pub mod background;
pub mod element; pub mod element;
pub mod event; pub mod event;

View file

@ -1,7 +1,7 @@
//! element measurement, hints and responses //! element measurement, hints and responses
use glam::Vec2; use glam::Vec2;
use crate::rectangle::Rect; use crate::rect::Rect;
// #[non_exhaustive] // #[non_exhaustive]
#[derive(Default)] #[derive(Default)]