diff options
author | Aki <please@ignore.pl> | 2022-01-30 17:41:24 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-01-30 17:41:24 +0100 |
commit | 51657e10769faa2617d546a06c42e4c62a19bb50 (patch) | |
tree | 688ad8b61ac02e50974684b9b7d3f886fb469e5f /Stars45/Button.cpp | |
parent | db987e23d5dd33a5db8764743facbb906ac22b0f (diff) | |
download | starshatter-51657e10769faa2617d546a06c42e4c62a19bb50.zip starshatter-51657e10769faa2617d546a06c42e4c62a19bb50.tar.gz starshatter-51657e10769faa2617d546a06c42e4c62a19bb50.tar.bz2 |
Removed trailing whitespace all over the place
Diffstat (limited to 'Stars45/Button.cpp')
-rw-r--r-- | Stars45/Button.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Stars45/Button.cpp b/Stars45/Button.cpp index 292e29a..c4a8de1 100644 --- a/Stars45/Button.cpp +++ b/Stars45/Button.cpp @@ -262,7 +262,7 @@ Button::Draw() DrawText(text.data(), 0, label_rect, DT_CALCRECT | align); vert_space = (vert_space - label_rect.h)/2; - + label_rect.w = horz_space; if (vert_space > 0) @@ -276,14 +276,14 @@ Button::Draw() if (drop_shadow) { label_rect.x++; label_rect.y++; - + font->SetColor(back_color); DrawText(text.data(), text.length(), label_rect, align); - + label_rect.x--; label_rect.y--; } - + font->SetColor(fore_color); DrawText(text.data(), text.length(), label_rect, align); } @@ -351,13 +351,13 @@ Button::CalcPictureRect() int h = rect.h; int img_w = picture.Width(); int img_h = picture.Height(); - + if (img_h > h) img_h = h-2; if (img_w > w) img_w = w-2; - + int img_x_offset = bevel_width; int img_y_offset = bevel_width; - + switch (picture_loc) { default: @@ -391,7 +391,7 @@ Button::CalcPictureRect() img_y_offset = h - img_h - bevel_width; break; } - + Rect img_rect; img_rect.x = img_x_offset; img_rect.y = img_y_offset; @@ -557,11 +557,11 @@ int Button::OnClick() } int Button::OnMouseEnter(int mx, int my) -{ +{ if (button_state >= 0) pre_state = button_state; - if (button_state == 0) + if (button_state == 0) button_state = -1; if (IsEnabled() && IsShown()) @@ -571,7 +571,7 @@ int Button::OnMouseEnter(int mx, int my) } int Button::OnMouseExit(int mx, int my) -{ +{ if (button_state == -1) button_state = pre_state; |