Skip to content

Commit

Permalink
v2.0.0.1 - Fixed issue that might interrupt item auto use with hotbar…
Browse files Browse the repository at this point in the history
… emitters
  • Loading branch information
hamstar0 committed Jun 10, 2020
1 parent 42f5b7c commit ae7b622
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Emitters/UI/EditorButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,21 @@ public void ReadyEditorButtonPress( Action func ) {
this.EditorButtonAction = func;
}

/// <summary></summary>
/// <returns>`true` if mouse interaction has occurred.</returns>
public bool PressEditorButtonIfInteracting() {
if( this.EditorButtonAction == null ) {
return false;
}

if( Main.mouseLeft && Main.mouseLeftRelease ) {
bool isMouse = Main.mouseLeft && Main.mouseLeftRelease;
if( isMouse ) {
this.EditorButtonAction.Invoke();
}

this.EditorButtonAction = null;

return true;
return isMouse;
}


Expand Down
2 changes: 1 addition & 1 deletion Emitters/build.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
displayName = Emitters
author = hamstar
version = 2.0.0
version = 2.0.0.1
modReferences = [email protected]
buildIgnore = *.csproj, *.user, *.bat, obj\*, bin\*, .vs\*, .git\*
homepage = https://forums.terraria.org/index.php?threads/emitters.87584/

0 comments on commit ae7b622

Please sign in to comment.