mirror of
https://github.com/OMGeeky/ItemChecklist.git
synced 2025-12-28 23:36:09 +01:00
0.5.2 fix phantom ui problem.
This commit is contained in:
@@ -113,8 +113,6 @@ namespace ItemChecklist
|
||||
ItemChecklistInterface?.Update(gameTime);
|
||||
}
|
||||
|
||||
int lastSeenScreenWidth;
|
||||
int lastSeenScreenHeight;
|
||||
public override void ModifyInterfaceLayers(List<GameInterfaceLayer> layers)
|
||||
{
|
||||
int MouseTextIndex = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text"));
|
||||
@@ -124,16 +122,9 @@ namespace ItemChecklist
|
||||
"ItemChecklist: Item Checklist",
|
||||
delegate
|
||||
{
|
||||
if (ItemChecklistUI.visible)
|
||||
if (ItemChecklistUI.Visible)
|
||||
{
|
||||
if (lastSeenScreenWidth != Main.screenWidth || lastSeenScreenHeight != Main.screenHeight)
|
||||
{
|
||||
ItemChecklistInterface.Recalculate();
|
||||
lastSeenScreenWidth = Main.screenWidth;
|
||||
lastSeenScreenHeight = Main.screenHeight;
|
||||
}
|
||||
|
||||
ItemChecklistUI.Draw(Main.spriteBatch);
|
||||
ItemChecklistInterface?.Draw(Main.spriteBatch, new GameTime());
|
||||
|
||||
if (ItemChecklistUI.hoverText != "")
|
||||
{
|
||||
|
||||
@@ -36,11 +36,11 @@ namespace ItemChecklist
|
||||
{
|
||||
if (ItemChecklist.ToggleChecklistHotKey.JustPressed)
|
||||
{
|
||||
if (!ItemChecklistUI.visible)
|
||||
if (!ItemChecklistUI.Visible)
|
||||
{
|
||||
ItemChecklist.instance.ItemChecklistUI.UpdateNeeded();
|
||||
}
|
||||
ItemChecklistUI.visible = !ItemChecklistUI.visible;
|
||||
ItemChecklistUI.Visible = !ItemChecklistUI.Visible;
|
||||
// Debug assistance, allows for reinitializing RecipeBrowserUI
|
||||
//if (!ItemChecklistUI.visible)
|
||||
//{
|
||||
@@ -55,7 +55,7 @@ namespace ItemChecklist
|
||||
public override void OnEnterWorld(Player player)
|
||||
{
|
||||
var itemChecklistPlayer = Main.LocalPlayer.GetModPlayer<ItemChecklistPlayer>(mod);
|
||||
ItemChecklistUI.visible = false;
|
||||
ItemChecklistUI.Visible = false;
|
||||
ItemChecklistUI.announce = announcePreference;
|
||||
ItemChecklistUI.collectChestItems = findChestItemsPreference;
|
||||
//ItemChecklistUI.sortMode = sortModePreference;
|
||||
|
||||
@@ -32,7 +32,11 @@ namespace ItemChecklist
|
||||
//public static SortModes sortMode = SortModes.TerrariaSort;
|
||||
|
||||
float spacing = 8f;
|
||||
public static bool visible = false;
|
||||
public static bool Visible
|
||||
{
|
||||
get { return ItemChecklist.ItemChecklistInterface.CurrentState == ItemChecklist.instance.ItemChecklistUI; }
|
||||
set { ItemChecklist.ItemChecklistInterface.SetState(value ? ItemChecklist.instance.ItemChecklistUI : null); }
|
||||
}
|
||||
public static int showCompleted = 0; // 0: both, 1: unfound, 2: found
|
||||
public static bool announce = true;
|
||||
public static bool collectChestItems = true;
|
||||
|
||||
Reference in New Issue
Block a user