Mercurial > hg > openttd
comparison src/company_gui.cpp @ 11425:532a1c74074d draft
(svn r15783) -Codechange: make the dropdown draw code pass around the left/right instead of the x and width to make drawing text at offsets easier.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sat, 21 Mar 2009 19:31:47 +0000 |
parents | 474ba6cc0946 |
children | a20dd0000d96 |
comparison
equal
deleted
inserted
replaced
11424:4e723beaac18 | 11425:532a1c74074d |
---|---|
397 bool Selectable() const | 397 bool Selectable() const |
398 { | 398 { |
399 return true; | 399 return true; |
400 } | 400 } |
401 | 401 |
402 void Draw(int x, int y, uint width, uint height, bool sel, int bg_colour) const | 402 void Draw(int left, int right, int top, int bottom, bool sel, int bg_colour) const |
403 { | 403 { |
404 DrawSprite(SPR_VEH_BUS_SIDE_VIEW, PALETTE_RECOLOUR_START + this->result, x + 16, y + 7); | 404 DrawSprite(SPR_VEH_BUS_SIDE_VIEW, PALETTE_RECOLOUR_START + this->result, left + 16, top + 7); |
405 DrawStringTruncated(x + 32, y + 3, this->String(), sel ? TC_WHITE : TC_BLACK, width - 30); | 405 DrawString(left + 32, right - 2, top + 3, this->String(), sel ? TC_WHITE : TC_BLACK); |
406 } | 406 } |
407 }; | 407 }; |
408 | 408 |
409 struct SelectCompanyLiveryWindow : public Window { | 409 struct SelectCompanyLiveryWindow : public Window { |
410 private: | 410 private: |