mirror of
https://github.com/usatiuk/cardboy.git
synced 2025-10-28 15:17:48 +01:00
get rid of window refresh
This commit is contained in:
@@ -97,7 +97,7 @@ public:
|
||||
return *_grid[x][y];
|
||||
}
|
||||
|
||||
void refresh() override {
|
||||
void refresh() {
|
||||
for (int i = 0; i < nWidth; ++i) {
|
||||
for (int j = 0; j < nHeight; ++j) {
|
||||
if (i == _current_focus_x && j == _current_focus_y) {
|
||||
|
||||
@@ -57,7 +57,6 @@ public:
|
||||
template<typename WindowType, typename... Args>
|
||||
void set_window(Args&&... args) {
|
||||
_window = std::make_unique<WindowType>(static_cast<Derived*>(this), std::forward<Args>(args)...);
|
||||
_window->refresh();
|
||||
}
|
||||
|
||||
Surface(const Surface& other) = delete;
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
return EventHandlingResult::DONE;
|
||||
}
|
||||
|
||||
void refresh() override {
|
||||
void refresh() {
|
||||
this->_owner->clear();
|
||||
size_t _max_col = this->_owner->get_width() / 8;
|
||||
size_t _max_row = this->_owner->get_height() / 16;
|
||||
|
||||
@@ -25,8 +25,6 @@ public:
|
||||
// static_assert(is_specialization_of<Surface, SurfaceType>::value);
|
||||
}
|
||||
|
||||
virtual void refresh() = 0;
|
||||
|
||||
virtual ~Window() = default;
|
||||
|
||||
EventHandlingResult handle(auto Event) { return handle_v(Event); }
|
||||
|
||||
Reference in New Issue
Block a user