You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
569 B
27 lines
569 B
|
1 month ago
|
#include "control_panel.hpp"
|
||
|
|
#include <fmt/xchar.h>
|
||
|
|
#include "constants.hpp"
|
||
|
|
|
||
|
|
ControlPanel::ControlPanel() {
|
||
|
|
}
|
||
|
|
|
||
|
|
void ControlPanel::init(sf::Vector2f size) {
|
||
|
|
$gui.position(0, size.y, size.x, WINDOW_HEIGHT - size.y);
|
||
|
|
$gui.layout("[buttons|code]");
|
||
|
|
|
||
|
|
for(auto& [name, cell] : $gui.cells()) {
|
||
|
|
auto id = $gui.entity(name);
|
||
|
|
$gui.set<guecs::Rectangle>(id, {});
|
||
|
|
$gui.set<guecs::Text>(id, {guecs::to_wstring(name)});
|
||
|
|
}
|
||
|
|
|
||
|
|
$gui.init();
|
||
|
|
}
|
||
|
|
|
||
|
|
void ControlPanel::render(sf::RenderTarget& window) {
|
||
|
|
$gui.render(window);
|
||
|
|
}
|
||
|
|
|
||
|
|
void ControlPanel::update(Chip8& vm) {
|
||
|
|
}
|