1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//! # Minifb-UI
//!
//! This is a crate aiming to make usage of the minifb crate easier than it already is,
//! by providing abstractions and features for easy creation and management of windows
//! and UI elements.
//!
//! # Example Usage
//!
//! ```rust
//! use minifb_ui;
//!
//! fn main() {
//! let mut window = minifb_ui::window::Window::custom("TestWindow", 1920, 1080, false, false);
//!
//! let font = minifb_ui::ttf::Font::new("assets/Dico.ttf").unwrap();
//! let text = minifb_ui::ui::text::Text::new(
//! "The quick brown fox jumps over the lazy dog !\"ยง$%&/()=?+~*#'-_.:,;<>|",
//! font,
//! );
//!
//! let mut button = minifb_ui::ui::button::Button::default()
//! .label(
//! "Press Me!",
//! minifb_ui::ttf::Font::new("assets/whitrabt.ttf").unwrap(),
//! 20.0
//! )
//! .idle_label_col(minifb_ui::color::Color::from(0xCCCCCC))
//! .hover_label_col(minifb_ui::color::Color::from(0xDDDDDD))
//! .click_label_col(minifb_ui::color::Color::from(0xAAFFAA))
//! .label_alignment(minifb_ui::ui::button::Alignment::Center)
//! .position(100, 100)
//! .size(150, 33)
//! .border(2)
//! .idle_shadow(5, 10)
//! .hover_shadow(7, 20)
//! .click_shadow(10, 10)
//! .border_color(minifb_ui::color::Color::from(0x444444))
//! .background(minifb_ui::color::Color::from(0x222222))
//! .hover_bg(minifb_ui::color::Color::from(0x333333));
//!
//! while window.window.is_open() {
//! window.clear(&minifb_ui::color::Color::from(0x0));
//! window.draw_text(
//! 10,
//! 10,
//! &text,
//! 16.0,
//! &minifb_ui::color::Color::from(0xFFFFFF),
//! );
//! button.draw(&mut window);
//! window.update();
//! }
//! }
//! ```
/// Provides necessary things to work with ttf and otf fonts
/// Provides the Window struct and gives you everything you need to create one and draw in it
/// Provides the Color RGBA struct
/// Provides UI elements you can draw in a Window
/// Provides a Theme struct with dark/light presets
/// Provides animation/tween utilities
/// Provides layout helpers (VStack, HStack)
pub use ;
pub use Color;
pub use Font;
pub use Window;
pub use Theme;
pub use ;
pub use ;
pub use ;