Fix background rendering for some types of overlays on some platforms.

This commit is contained in:
casey langen 2021-12-29 11:56:29 -08:00
parent 1e61b497ec
commit bc9b026920
4 changed files with 4 additions and 4 deletions

View File

@ -213,7 +213,7 @@ void DialogOverlay::RecalculateSize() {
}
}
void DialogOverlay::Redraw() {
void DialogOverlay::OnRedraw() {
if (!this->IsVisible() || this->width <= 0 || this->height <= 0) {
return;
}

View File

@ -193,7 +193,7 @@ void InputOverlay::RecalculateSize() {
this->x = (Screen::GetWidth() / 2) - (this->width / 2);
}
void InputOverlay::Redraw() {
void InputOverlay::OnRedraw() {
if (!this->IsVisible() || this->width <= 0 || this->height <= 0) {
return;
}

View File

@ -69,12 +69,12 @@ namespace cursespp {
virtual void Layout();
virtual bool KeyPress(const std::string& key);
virtual void OnRedraw();
protected:
virtual void OnDismissed();
private:
void Redraw();
void RecalculateSize();
bool ProcessKey(const std::string& key);

View File

@ -63,6 +63,7 @@ namespace cursespp {
virtual void Layout();
virtual bool KeyPress(const std::string& key);
virtual void OnRedraw();
protected:
virtual void OnVisibilityChanged(bool visible);
@ -70,7 +71,6 @@ namespace cursespp {
virtual void OnInputKeyPress(TextInput* input, std::string key);
private:
void Redraw();
void RecalculateSize();
std::string title, text;