Remove redondant condition.
This commit is contained in:
parent
f8a4e309f2
commit
ad0b8c620d
1 changed files with 5 additions and 7 deletions
|
@ -1706,14 +1706,12 @@ void UIHandleButtonDown(unsigned button)
|
|||
// clicked on user buttons
|
||||
//
|
||||
} else if (ButtonAreaUnderCursor == ButtonAreaUser) {
|
||||
if (ButtonAreaUnderCursor == ButtonAreaUser) {
|
||||
for (size_t i = 0; i < UI.UserButtons.size(); ++i) {
|
||||
CUIUserButton &button = UI.UserButtons[i];
|
||||
for (size_t i = 0; i < UI.UserButtons.size(); ++i) {
|
||||
CUIUserButton &button = UI.UserButtons[i];
|
||||
|
||||
if (i == size_t(ButtonUnderCursor) && !button.Clicked) {
|
||||
PlayGameSound(GameSounds.Click.Sound, MaxSampleVolume);
|
||||
button.Clicked = true;
|
||||
}
|
||||
if (i == size_t(ButtonUnderCursor) && !button.Clicked) {
|
||||
PlayGameSound(GameSounds.Click.Sound, MaxSampleVolume);
|
||||
button.Clicked = true;
|
||||
}
|
||||
}
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue