30 lines
714 B
Zig
30 lines
714 B
Zig
const gui = @import("raygui");
|
|
const rl = @import("raylib");
|
|
const std = @import("std");
|
|
|
|
pub const GUI = struct {
|
|
pos : rl.Rectangle,
|
|
gui_pos : rl.Rectangle,
|
|
|
|
pub fn init(pos : rl.Rectangle) GUI {
|
|
var Gui__ = GUI {
|
|
.pos = pos,
|
|
.gui_pos = rl.Rectangle.init(0, 0, 0, 0),
|
|
};
|
|
|
|
Gui__.addRightSide();
|
|
return Gui__;
|
|
}
|
|
|
|
fn addRightSide(self : *GUI) void {
|
|
self.gui_pos.height = self.pos.height;
|
|
self.gui_pos.width = self.pos.width / 4;
|
|
self.gui_pos.x = self.pos.x/4 * 3;
|
|
self.gui_pos.y = 0;
|
|
}
|
|
|
|
pub fn draw(self : *GUI) void {
|
|
//panel
|
|
rl.drawRectangleRec(self.gui_pos, .dark_gray);
|
|
}
|
|
}; |