mooeye 0.4.1

A small UI library designed on top of the ggez game library. WORK IN PROGRESS
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use ggez::graphics::Rect;

#[derive(Clone, Copy, Debug, Default, PartialEq)]
/// This struct remembers the rects a UiElement was drawn to and holds a bool that returns wether or not it can be drawn to those rects again.
pub enum DrawCache {
    /// An invalid draw cache that needs to be recalculated.
    #[default]
    Invalid,
    /// A valid draw cache that contains the last target this element received as well as the outer (visuals) and inner (content) rectangles it was drawn to.
    Valid {
        /// The rectangle this elements visual background was drawn to last frame.
        outer: Rect,
        /// The rectangle this elements content was drawn to last frame.
        inner: Rect,
        /// The rectangle this elements received as a target area last frame.
        target: Rect,
    },
}