Make the tests go faster.
This commit is contained in:
parent
6d7a944a7d
commit
738d9a64d3
7 changed files with 6 additions and 222 deletions
|
|
@ -1,33 +0,0 @@
|
|||
#include "mini_map.hpp"
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include "dbc.hpp"
|
||||
#include "game/components.hpp"
|
||||
#include "algos/rand.hpp"
|
||||
#include "game/systems.hpp"
|
||||
#include "algos/rand.hpp"
|
||||
#include <codecvt>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
namespace gui {
|
||||
using namespace components;
|
||||
|
||||
MiniMapUI::MiniMapUI() :
|
||||
$map_grid{L"...", 45, {200, 200, 200, 100}, 10}
|
||||
{
|
||||
$font = std::make_shared<sf::Font>(FONT_FILE_NAME);
|
||||
}
|
||||
|
||||
void MiniMapUI::init(guecs::UI& overlay) {
|
||||
auto top_right = overlay.entity("top_right");
|
||||
auto cell = overlay.cell_for(top_right);
|
||||
$map_grid.init(cell, $font);
|
||||
}
|
||||
|
||||
void MiniMapUI::render(sf::RenderWindow &window, int compass_dir) {
|
||||
(void)compass_dir;
|
||||
$map_grid.update(L"I'M BROKEN");
|
||||
window.draw(*$map_grid.text);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#pragma once
|
||||
#include "graphics/textures.hpp"
|
||||
#include <guecs/ui.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace gui {
|
||||
class MiniMapUI {
|
||||
public:
|
||||
guecs::Text $map_grid;
|
||||
guecs::UI $gui;
|
||||
std::shared_ptr<sf::Font> $font = nullptr;
|
||||
|
||||
MiniMapUI();
|
||||
void init(guecs::UI& overlay);
|
||||
void render(sf::RenderWindow &window, int compass_dir);
|
||||
};
|
||||
}
|
||||
|
|
@ -24,7 +24,6 @@ sources = files(
|
|||
'gui/loot_ui.cpp',
|
||||
'gui/main_ui.cpp',
|
||||
'gui/map_view.cpp',
|
||||
'gui/mini_map.cpp',
|
||||
'gui/overlay_ui.cpp',
|
||||
'gui/ritual_ui.cpp',
|
||||
'gui/status_ui.cpp',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue