git repos / blockattack-game

commit 28857c9c

sago007 · 2016-09-28 18:47
28857c9c9a09302f0789781b6c18ba1baec40379 patch · browse files
parent 13476fc2f69602185c0ba852bf4749f23e7e7861

The DialogBox now scales... sort of

Changed files

M source/code/DialogBox.cpp before
diff --git a/source/code/DialogBox.cpp b/source/code/DialogBox.cpp index 6f337ae..a6f38d4 100644 --- a/source/code/DialogBox.cpp +++ b/source/code/DialogBox.cpp
@@ -96,6 +96,8 @@ bool DialogBox::IsActive() {
void DialogBox::Draw(SDL_Renderer* target) {
DrawBackground(screen);
+ this->x = xsize/2-300;
+ this->y = ysize/2-100;
DrawRectYellow(target, x, y, 200, 600);
nf_button_font.draw(target, x+300, y+20, NFont::CENTER, "%s", header.c_str());
nf_button_font.draw(target, x+150, y+140, NFont::CENTER, _("Enter to accept"));