Browse Source

address clang-format violations

pull/5986/head
ephphatha 3 years ago committed by Anders Jenbo
parent
commit
829d6b0d4a
  1. 3
      Source/control.cpp
  2. 4
      Source/panels/mainpanel.cpp

3
Source/control.cpp

@ -1342,7 +1342,8 @@ void DrawTalkPan(const Surface &out)
UiFlags color = player.friendlyMode ? UiFlags::ColorWhitegold : UiFlags::ColorRed;
const Point talkPanPosition = mainPanelPosition + Displacement { 172, 84 + 18 * talkBtn };
if (WhisperList[i]) {
if (TalkButtonsDown[talkBtn]) { // the normal (unpressed) voice button is pre-rendered on the panel, only need to draw over it when the button is held
// the normal (unpressed) voice button is pre-rendered on the panel, only need to draw over it when the button is held
if (TalkButtonsDown[talkBtn]) {
unsigned spriteIndex = talkBtn == 0 ? 2 : 3; // the first button sprite includes a tip from the devils wing so is different to the rest.
ClxDraw(out, talkPanPosition, (*talkButtons)[spriteIndex]);

4
Source/panels/mainpanel.cpp

@ -110,8 +110,8 @@ void LoadMainPanel()
OwnedSurface talkSurface(talkButtonWidth, talkButtonHeight * NumTalkButtonSprites);
// Prerender translated versions of the other button states for voice buttons
RenderClxSprite(talkSurface, (*talkButton)[0], { 0, 0 }); // background for unpressed mute button
RenderClxSprite(talkSurface, (*talkButton)[1], { 0, talkButtonHeight }); // background for pressed mute button
RenderClxSprite(talkSurface, (*talkButton)[0], { 0, 0 }); // background for unpressed mute button
RenderClxSprite(talkSurface, (*talkButton)[1], { 0, talkButtonHeight }); // background for pressed mute button
RenderClxSprite(talkSurface, (*talkButton)[1], { 0, talkButtonHeight * 2 }); // background for pressed voice button
talkButton = std::nullopt;

Loading…
Cancel
Save