After some prototyping I have what I think I want for the map. Just a simple piece of paper you take out that has the ASCII map on it.
This commit is contained in:
parent
acbf384e2a
commit
6c9016eb0f
21 changed files with 1184 additions and 92 deletions
|
@ -10,7 +10,8 @@ namespace gui {
|
|||
using std::any, std::any_cast, std::string, std::make_any;
|
||||
|
||||
StatusUI::StatusUI(GameLevel level) :
|
||||
$level(level), $ritual_ui(level)
|
||||
$level(level), $ritual_ui(level),
|
||||
$map_ui($level)
|
||||
{
|
||||
$gui.position(STATUS_UI_X, STATUS_UI_Y, STATUS_UI_WIDTH, STATUS_UI_HEIGHT);
|
||||
$gui.layout(
|
||||
|
@ -37,6 +38,8 @@ namespace gui {
|
|||
$log_to = $gui.entity("log_view");
|
||||
$gui.set<Rectangle>($log_to, {});
|
||||
$gui.set<Textual>($log_to, {"Welcome to the Game!", 20});
|
||||
|
||||
$map_ui.init(cell.x, cell.y, cell.w, cell.h);
|
||||
} else {
|
||||
auto button = $gui.entity(name);
|
||||
$gui.set<Rectangle>(button, {});
|
||||
|
@ -134,6 +137,11 @@ namespace gui {
|
|||
|
||||
void StatusUI::render(sf::RenderWindow &window) {
|
||||
$gui.render(window);
|
||||
|
||||
if(map_open) {
|
||||
$map_ui.render(window);
|
||||
}
|
||||
|
||||
$ritual_ui.render(window);
|
||||
}
|
||||
|
||||
|
@ -146,6 +154,7 @@ namespace gui {
|
|||
|
||||
void StatusUI::update_level(GameLevel &level) {
|
||||
$level = level;
|
||||
$map_ui.update_level($level);
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue