oters_gui 0.1.8

Graphical library definitions for the oters programming language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use oters_lang as oters;

use oters::export::export_oters;

#[derive(Debug, Clone, Copy)]
#[export_oters]
pub struct Color {
    pub r: i64,
    pub g: i64,
    pub b: i64,
    pub a: i64,
}

impl Color {
    pub fn to_macroquad(&self) -> macroquad::color::Color {
        macroquad::color::Color::from_rgba(self.r as u8, self.g as u8, self.b as u8, self.a as u8)
    }
}