| 286 | } |
| 287 | |
| 288 | int OnClick(const Rect &r, const Point &pt) const override |
| 289 | { |
| 290 | bool rtl = (_current_text_dir == TD_RTL); |
| 291 | int w = SETTING_BUTTON_WIDTH; |
| 292 | |
| 293 | Rect br = r.WithWidth(w, TEnd ^ rtl).CentreToHeight(SETTING_BUTTON_HEIGHT); |
| 294 | if (br.WithWidth(w / 2, rtl).Contains(pt)) return this->click_up; |
| 295 | if (br.WithWidth(w / 2, !rtl).Contains(pt)) return this->click_down; |
| 296 | |
| 297 | return this->TBase::OnClick(r.Indent(w + WidgetDimensions::scaled.hsep_wide, TEnd ^ rtl), pt); |
| 298 | } |
| 299 | |
| 300 | void Draw(const Rect &full, const Rect &r, bool sel, int click_result, Colours bg_colour) const override |
| 301 | { |
nothing calls this directly
no test coverage detected