Simple Loot UI started.
This commit is contained in:
parent
8a3046e141
commit
8545b8cf1d
23 changed files with 139 additions and 29 deletions
|
@ -1,51 +0,0 @@
|
|||
#include "overlay_ui.hpp"
|
||||
#include "constants.hpp"
|
||||
#include "color.hpp"
|
||||
#include "events.hpp"
|
||||
#include <optional>
|
||||
|
||||
namespace gui {
|
||||
using namespace guecs;
|
||||
|
||||
OverlayUI::OverlayUI() {
|
||||
$gui.position(RAY_VIEW_X, RAY_VIEW_Y, RAY_VIEW_WIDTH, RAY_VIEW_HEIGHT);
|
||||
$gui.layout(
|
||||
"[*%(100,300)left|top|>(170,170)top_right]"
|
||||
"[_|middle|middle_right]"
|
||||
"[_|bottom|bottom_right]"
|
||||
);
|
||||
}
|
||||
|
||||
void OverlayUI::init() {
|
||||
$gui.init();
|
||||
}
|
||||
|
||||
void OverlayUI::render(sf::RenderWindow& window) {
|
||||
$gui.render(window);
|
||||
// $gui.debug_layout(window);
|
||||
}
|
||||
|
||||
void OverlayUI::show_sprite(string region, string sprite_name) {
|
||||
$gui.show_sprite(region, sprite_name);
|
||||
}
|
||||
|
||||
void OverlayUI::close_sprite(string region) {
|
||||
$gui.close<Sprite>(region);
|
||||
}
|
||||
|
||||
void OverlayUI::show_text(string region, wstring content) {
|
||||
$gui.show_text(region, content);
|
||||
}
|
||||
|
||||
void OverlayUI::close_text(string region) {
|
||||
$gui.close<Textual>(region);
|
||||
}
|
||||
|
||||
void OverlayUI::show_label(string region, wstring content) {
|
||||
$gui.show_label(region, content);
|
||||
}
|
||||
|
||||
void OverlayUI::close_label(string region) {
|
||||
$gui.close<Label>(region);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue