Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ UpdateHover()

static void Terraria.UI.ChestUI.UpdateHover ( int ID,
bool hovering )
inlinestatic

Definition at line 46 of file ChestUI.cs.

47 {
48 if (hovering)
49 {
50 if (!ButtonHovered[ID])
51 {
53 }
54 ButtonHovered[ID] = true;
55 ButtonScale[ID] += 0.05f;
56 if (ButtonScale[ID] > 1f)
57 {
58 ButtonScale[ID] = 1f;
59 }
60 }
61 else
62 {
63 ButtonHovered[ID] = false;
64 ButtonScale[ID] -= 0.05f;
65 if (ButtonScale[ID] < 0.75f)
66 {
67 ButtonScale[ID] = 0.75f;
68 }
69 }
70 }
static void PlaySound(int type, Vector2 position, int style=1)
static float[] ButtonScale
Definition ChestUI.cs:42
static bool[] ButtonHovered
Definition ChestUI.cs:44

References Terraria.UI.ChestUI.ButtonHovered, Terraria.UI.ChestUI.ButtonScale, and Terraria.Audio.SoundEngine.PlaySound().

Referenced by Terraria.UI.ChestUI.DrawButton().