Default positions for the Charge Meter and Speedrun Timer.
This commit is contained in:
1 parent
51901a2158
commit
473424e4ac
3 files changed
+9
-12
No files matched your search
+4
-9
@@ -141,7 +141,7 @@ namespace CalamityMod
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
[DefaultValue(49.47917f)]
|
||||
[DefaultValue(ChargeMeterUI.DefaultChargePosX)]
|
||||
[Tooltip("$Mods.CalamityMod.Config.EntryTooltip.ChargeMeterPosX")]
|
||||
public float ChargeMeterPosX { get; set; }
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace CalamityMod
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
[DefaultValue(43f)]
|
||||
[DefaultValue(ChargeMeterUI.DefaultChargePosY)]
|
||||
[Tooltip("$Mods.CalamityMod.Config.EntryTooltip.ChargeMeterPosY")]
|
||||
public float ChargeMeterPosY { get; set; }
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace CalamityMod
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
[DefaultValue(53.5417f)]
|
||||
[DefaultValue(SpeedrunTimerUI.DefaultTimerPosX)]
|
||||
[Tooltip("$Mods.CalamityMod.Config.EntryTooltip.SpeedrunTimerPosX")]
|
||||
public float SpeedrunTimerPosX { get; set; }
|
||||
|
||||
@@ -171,7 +171,7 @@ namespace CalamityMod
|
||||
[BackgroundColor(192, 54, 64, 192)]
|
||||
[SliderColor(224, 165, 56, 128)]
|
||||
[Range(0f, 100f)]
|
||||
[DefaultValue(0.01481f)]
|
||||
[DefaultValue(SpeedrunTimerUI.DefaultTimerPosY)]
|
||||
[Tooltip("$Mods.CalamityMod.Config.EntryTooltip.SpeedrunTimerPosY")]
|
||||
public float SpeedrunTimerPosY { get; set; }
|
||||
#endregion
|
||||
@@ -327,11 +327,6 @@ namespace CalamityMod
|
||||
// Because it is impossible to know the item IDs of Calamity items until runtime,
|
||||
// and we have many config titles which use embedded Calamity items,
|
||||
// we need to dynamically declare those items and inject them as dynamic localization.
|
||||
//
|
||||
// TODO -- this doesn't work, see CalamityMod for more info
|
||||
// if you do fix this, you will need to add _ in front of all entry title keys above
|
||||
// or alternatively change the mechanism via which the dynamic localizations are injected
|
||||
// You are not allowed to get registered mod translations in any way
|
||||
internal static void RegisterDynamicLocalization()
|
||||
{
|
||||
static string EmbedItem(int itemID, string suffix = "") => $"[i:{itemID}] {suffix}";
|
||||
|
||||
+4
-2
@@ -10,8 +10,10 @@ namespace CalamityMod.UI
|
||||
{
|
||||
public class ChargeMeterUI
|
||||
{
|
||||
public static Vector2 DrawPosition = new Vector2(CalamityConfig.Instance.ChargeMeterPosX, CalamityConfig.Instance.ChargeMeterPosY);
|
||||
public static Vector2 Offset = DrawPosition;
|
||||
internal const float DefaultChargePosX = 49.47917f;
|
||||
internal const float DefaultChargePosY = 43f;
|
||||
private const float MouseDragEpsilon = 0.05f; // 0.05%
|
||||
|
||||
public static void Draw(SpriteBatch spriteBatch, Player player)
|
||||
{
|
||||
if (DrawPosition.X <= 60f && DrawPosition.Y <= 20f)
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.UI
|
||||
public class SpeedrunTimerUI
|
||||
{
|
||||
internal const float DefaultTimerPosX = 46f;
|
||||
internal const float DefaultTimerPosY = 1f;
|
||||
internal const float DefaultTimerPosY = 1.481f;
|
||||
|
||||
public static void Draw(Player player)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user