| 1748 | } |
| 1749 | |
| 1750 | void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override |
| 1751 | { |
| 1752 | switch (widget) { |
| 1753 | case WID_BH_PROTECT_TOGGLE: |
| 1754 | BuildHouseWindow::house_protected = !BuildHouseWindow::house_protected; |
| 1755 | this->SetWidgetLoweredState(WID_BH_PROTECT_TOGGLE, BuildHouseWindow::house_protected); |
| 1756 | |
| 1757 | SndClickBeep(); |
| 1758 | this->SetDirty(); |
| 1759 | break; |
| 1760 | |
| 1761 | case WID_BH_REPLACE_TOGGLE: |
| 1762 | BuildHouseWindow::replace = !BuildHouseWindow::replace; |
| 1763 | this->SetWidgetLoweredState(WID_BH_REPLACE_TOGGLE, BuildHouseWindow::replace); |
| 1764 | |
| 1765 | SndClickBeep(); |
| 1766 | this->SetDirty(); |
| 1767 | break; |
| 1768 | |
| 1769 | default: |
| 1770 | this->PickerWindow::OnClick(pt, widget, click_count); |
| 1771 | break; |
| 1772 | } |
| 1773 | } |
| 1774 | |
| 1775 | void OnInvalidateData(int data = 0, bool gui_scope = true) override |
| 1776 | { |
nothing calls this directly
no test coverage detected