Skip to content

Commit

Permalink
IntFancyButton::displayBlank: Make question mark configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Aug 29, 2023
1 parent a9925ae commit cd4dd40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/intdisplay.cpp
Expand Up @@ -1258,7 +1258,7 @@ void IntFancyButton::displayImage(AtlasImage image, int xOffset, int yOffset)
}

// Create a blank button.
void IntFancyButton::displayBlank(int xOffset, int yOffset)
void IntFancyButton::displayBlank(int xOffset, int yOffset, bool withQuestionMark)
{
UDWORD ox, oy;

Expand All @@ -1273,8 +1273,11 @@ void IntFancyButton::displayBlank(int xOffset, int yOffset)

displayClear(xOffset, yOffset);

// Draw a question mark, bit of quick hack this.
iV_DrawImage(IntImages, IMAGE_QUESTION_MARK, xOffset + x() + ox + 10, yOffset + y() + oy + 3);
if (withQuestionMark)
{
// Draw a question mark, bit of quick hack this.
iV_DrawImage(IntImages, IMAGE_QUESTION_MARK, xOffset + x() + ox + 10, yOffset + y() + oy + 3);
}
}

// Returns true if the droid is currently building something.
Expand Down
2 changes: 1 addition & 1 deletion src/intdisplay.h
Expand Up @@ -130,7 +130,7 @@ class IntFancyButton : public W_CLICKFORM
void displayClear(int xOffset, int yOffset);
void displayIMD(AtlasImage image, ImdObject imdObject, int xOffset, int yOffset);
void displayImage(AtlasImage image, int xOffset, int yOffset);
void displayBlank(int xOffset, int yOffset);
void displayBlank(int xOffset, int yOffset, bool withQuestionMark = true);
void displayIfHighlight(int xOffset, int yOffset);

struct
Expand Down

0 comments on commit cd4dd40

Please sign in to comment.