Skip to content

Commit

Permalink
v2.0.0.3 - Removed outdated/incorrect tooltip for accessing item sett…
Browse files Browse the repository at this point in the history
…ings

* Removed outdated/incorrect tooltip for accessing item settings
* Set settings button to draw faintly when not hovered
  • Loading branch information
hamstar0 committed Jun 12, 2020
1 parent 0104807 commit 791301a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Emitters/Items/EmitterItem_Tooltips.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ namespace Emitters.Items {
public partial class EmitterItem : ModItem, IBaseEmitterItem {
public override void ModifyTooltips( List<TooltipLine> tooltips ) {
int i = 1;
tooltips.Insert( i++, new TooltipLine(this.mod, "EmitterUI", "[c/00FF00:Right-click in inventory to adjust settings]") );
//tooltips.Insert( i++, new TooltipLine(this.mod, "EmitterUI", "[c/00FF00:Right-click in inventory to adjust settings]") );
//tooltips.Insert( i++, new TooltipLine(this.mod, "EmitterToggle", "[c/00FF00:Left-click in world to toggle activation]") );
tooltips.Insert( i++, new TooltipLine(this.mod, "EmitterRemove", "[c/00FF00:Right-click in world to remove]") );
tooltips.Insert( i++, new TooltipLine(this.mod, "EmitterRemove", "[c/00FF00:Right-click in world to reclaim]") );

if( this.Def == null ) {
return;
Expand Down
4 changes: 2 additions & 2 deletions Emitters/Items/HologramItem_Tooltips.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ namespace Emitters.Items {
public partial class HologramItem : ModItem, IBaseEmitterItem {
public override void ModifyTooltips( List<TooltipLine> tooltips ) {
int i = 1;
tooltips.Insert( i++, new TooltipLine( this.mod, "HologramUI", "[c/00FF00:Right-click in inventory to adjust settings]" ) );
//tooltips.Insert( i++, new TooltipLine( this.mod, "HologramUI", "[c/00FF00:Right-click in inventory to adjust settings]" ) );
//tooltips.Insert( i++, new TooltipLine( this.mod, "HologramToggle", "[c/00FF00:Left-click in world to toggle activation]" ) );
tooltips.Insert( i++, new TooltipLine( this.mod, "HologramRemove", "[c/00FF00:Right-click in world to remove]" ) );
tooltips.Insert( i++, new TooltipLine( this.mod, "HologramRemove", "[c/00FF00:Right-click in world to reclaim]" ) );

if( this.Def == null ) {
return;
Expand Down
4 changes: 2 additions & 2 deletions Emitters/Items/SoundEmitterItem_Tooltips.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ namespace Emitters.Items {
public partial class SoundEmitterItem : ModItem, IBaseEmitterItem {
public override void ModifyTooltips( List<TooltipLine> tooltips ) {
int i = 1;
tooltips.Insert( i++, new TooltipLine( this.mod, "SndEmitterUI", "[c/00FF00:Right-click in inventory to adjust settings]" ) );
//tooltips.Insert( i++, new TooltipLine( this.mod, "SndEmitterUI", "[c/00FF00:Right-click in inventory to adjust settings]" ) );
//tooltips.Insert( i++, new TooltipLine( this.mod, "SndEmitterToggle", "[c/00FF00:Left-click in world to toggle activation]" ) );
tooltips.Insert( i++, new TooltipLine( this.mod, "SndEmitterRemove", "[c/00FF00:Right-click in world to remove]" ) );
tooltips.Insert( i++, new TooltipLine( this.mod, "SndEmitterRemove", "[c/00FF00:Right-click in world to reclaim]" ) );

if( this.Def == null ) {
return;
Expand Down
4 changes: 2 additions & 2 deletions Emitters/UI/EditorButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public bool PressEditorButtonIfInteracting() {

////////////////

public void DrawEditorButton( SpriteBatch sb, Vector2 scrPos ) {
public void DrawEditorButton( SpriteBatch sb, Vector2 scrPos, Color color ) {
sb.Draw(
texture: this.EditorButtonTex,
position: scrPos,
color: Color.White
color: color
);
}
}
Expand Down
8 changes: 5 additions & 3 deletions Emitters/UI/EditorButton_ItemHooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ public void PostDrawInInventory( SpriteBatch sb, Vector2 pos ) {
height: this.EditorButtonTex.Height
);

if( mouseRect.Contains( Main.mouseX, Main.mouseY ) ) {
this.DrawEditorButton( sb, newPos );
}
Color color = mouseRect.Contains( Main.mouseX, Main.mouseY )
? Color.White
: Color.White * 0.15f;

this.DrawEditorButton( sb, newPos, color );
}
}
}
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.2
version = 2.0.0.3
modReferences = HamstarHelpers@5.8.1
buildIgnore = *.csproj, *.user, *.bat, obj\*, bin\*, .vs\*, .git\*
homepage = https://forums.terraria.org/index.php?threads/emitters.87584/

0 comments on commit 791301a

Please sign in to comment.