initial text wrapping impl (resizing will break)

This commit is contained in:
2025-09-28 01:32:10 -04:00
parent b2950566af
commit 61df088cc7
8 changed files with 126 additions and 55 deletions

View File

@@ -2,7 +2,7 @@ use crate::{
layout::UiNum,
util::{DivOr, impl_op},
};
use std::ops::*;
use std::{marker::Destruct, ops::*};
#[repr(C)]
#[derive(Clone, Copy, PartialEq, Default, bytemuck::Pod, bytemuck::Zeroable)]
@@ -79,7 +79,10 @@ impl Neg for Vec2 {
}
}
impl<T: UiNum, U: UiNum> From<(T, U)> for Vec2 {
impl<T: const UiNum, U: const UiNum> const From<(T, U)> for Vec2
where
(T, U): const Destruct,
{
fn from((x, y): (T, U)) -> Self {
Self {
x: x.to_f32(),