mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-14 13:21:13 +00:00
Fix background rendering for some types of overlays on some platforms.
This commit is contained in:
parent
1e61b497ec
commit
bc9b026920
@ -213,7 +213,7 @@ void DialogOverlay::RecalculateSize() {
|
||||
}
|
||||
}
|
||||
|
||||
void DialogOverlay::Redraw() {
|
||||
void DialogOverlay::OnRedraw() {
|
||||
if (!this->IsVisible() || this->width <= 0 || this->height <= 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user