Skip to content

Commit

Permalink
Disable stand button when in town
Browse files Browse the repository at this point in the history
  • Loading branch information
AJenbo authored and kphoenix137 committed Mar 22, 2022
1 parent c5b6456 commit d7c8ba0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/controls/touch/event_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ bool VirtualGamepadEventHandler::Handle(const SDL_Event &event)
if (directionPadEventHandler.Handle(event))
return true;

if (standButtonEventHandler.Handle(event))
if (leveltype != DTYPE_TOWN && standButtonEventHandler.Handle(event))
return true;

if (primaryActionButtonEventHandler.Handle(event))
Expand Down
3 changes: 2 additions & 1 deletion Source/controls/touch/renderers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ void VirtualGamepadRenderer::Render(RenderFunction renderFunction)
healthButtonRenderer.RenderPotion(renderFunction, potionArt);
manaButtonRenderer.RenderPotion(renderFunction, potionArt);

standButtonRenderer.Render(renderFunction, buttonArt);
if (leveltype != DTYPE_TOWN)
standButtonRenderer.Render(renderFunction, buttonArt);
directionPadRenderer.Render(renderFunction);
menuPanelRenderer.Render(renderFunction);
}
Expand Down

0 comments on commit d7c8ba0

Please sign in to comment.