Skip to content

Commit

Permalink
Menu fix (#4)
Browse files Browse the repository at this point in the history
* bool fix

* bug fixes

Co-authored-by: Bobo <Bobo@BOBO-GAME>
  • Loading branch information
BoBoBaSs84 and Bobo authored Jun 29, 2022
1 parent e5a4210 commit b05f98c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
15 changes: 8 additions & 7 deletions Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ namespace Los.Santos.Dope.Wars
/// </summary>
public static class Enums
{
/// <summary>
/// The <see cref="LogLevels"/> enums
/// </summary>
/// <summary>
/// The <see cref="LogLevels"/> enums
/// </summary>
[Flags]
public enum LogLevels
{
/// <summary>
Expand All @@ -19,19 +20,19 @@ public enum LogLevels
/// <summary>
/// The <see cref="Status"/> level
/// </summary>
Status = 20,
Status = 1,
/// <summary>
/// The <see cref="Warning"/> level
/// </summary>
Warning = 40,
Warning = 2,
/// <summary>
/// The <see cref="Error"/> level
/// </summary>
Error = 50,
Error = 4,
/// <summary>
/// The <see cref="Panic"/> level
/// </summary>
Panic = 100
Panic = 8
}

/// <summary>
Expand Down
14 changes: 7 additions & 7 deletions GUI/DealMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ private void DealMenu_OnTick(object sender, EventArgs e)
{
MenuLoaded = true;
SetupMenu();
Wait(10);
BuyMenu.Visible = true;
StatsMenu.Visible = true;
}
BuyMenu.Visible = !BuyMenu.Visible;
StatsMenu.Visible = !StatsMenu.Visible;
}
else
{
Expand Down Expand Up @@ -207,10 +208,10 @@ private static Color GetMenuBannerColor()
{
return (PedHash)Game.Player.Character.Model switch
{
PedHash.Franklin => System.Drawing.Color.LightGreen,
PedHash.Michael => System.Drawing.Color.SkyBlue,
PedHash.Trevor => System.Drawing.Color.SandyBrown,
_ => System.Drawing.Color.Black
PedHash.Franklin => Color.LightGreen,
PedHash.Michael => Color.SkyBlue,
PedHash.Trevor => Color.SandyBrown,
_ => Color.Black
};
}

Expand Down Expand Up @@ -344,7 +345,6 @@ private void DrugMenuRefresh(NativeMenu sourceMenu, NativeMenu targetMenu, strin
targetMenuItem.Enabled = false;
}
}

}
catch (Exception ex)
{
Expand Down
8 changes: 6 additions & 2 deletions Missions/Warehouse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static class Warehouse
private static Script Script = null!;
private static GameState GameState = null!;
private static PlayerStats PlayerStats = null!;
private static IPlayerProperty DrugWarehouse = null!;
private static DrugWarehouse DrugWarehouse = null!;

/// <summary>
/// The <see cref="ShowWarehouseMenu"/> property
Expand Down Expand Up @@ -103,7 +103,11 @@ public static void Init(GameState gameState)
{
GameState = gameState;
PlayerStats = Utils.GetPlayerStatsFromModel(gameState);
}
DrugWarehouse = new()
{
DrugStash = PlayerStats.Warehouse.DrugStash
};
}

/// <summary>
///
Expand Down

0 comments on commit b05f98c

Please sign in to comment.