From da20c52e05650fd32a2e119c43f917e277f0483a Mon Sep 17 00:00:00 2001 From: in0finite Date: Tue, 23 Jul 2019 16:29:16 +0200 Subject: [PATCH] load arrow textures --- Assets/Scripts/Behaviours/Loader.cs | 7 +++++++ Assets/Scripts/UI/HUD.cs | 5 +++++ Docs/TODO.md | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Behaviours/Loader.cs b/Assets/Scripts/Behaviours/Loader.cs index 8f0dbe83..b85e2883 100644 --- a/Assets/Scripts/Behaviours/Loader.cs +++ b/Assets/Scripts/Behaviours/Loader.cs @@ -406,6 +406,13 @@ namespace SanAndreasUnity.Behaviours // fist texture Weapon.FistTexture = TextureDictionary.Load("hud").GetDiffuse("fist").Texture; + // arrow textures + var pcbtnsTxd = TextureDictionary.Load("pcbtns"); + UI.HUD.LeftArrowTexture = pcbtnsTxd.GetDiffuse("left").Texture; + UI.HUD.RightArrowTexture = pcbtnsTxd.GetDiffuse("right").Texture; + UI.HUD.UpArrowTexture = pcbtnsTxd.GetDiffuse("up").Texture; + UI.HUD.DownArrowTexture = pcbtnsTxd.GetDiffuse("down").Texture; + } diff --git a/Assets/Scripts/UI/HUD.cs b/Assets/Scripts/UI/HUD.cs index e4159bf0..f09d4bb2 100644 --- a/Assets/Scripts/UI/HUD.cs +++ b/Assets/Scripts/UI/HUD.cs @@ -21,6 +21,11 @@ namespace SanAndreasUnity.UI { public bool drawRedDotOnScreenCenter = false; + public static Texture2D LeftArrowTexture { get; set; } + public static Texture2D RightArrowTexture { get; set; } + public static Texture2D UpArrowTexture { get; set; } + public static Texture2D DownArrowTexture { get; set; } + void Awake () { diff --git a/Docs/TODO.md b/Docs/TODO.md index 3bbf286e..89be4eb7 100644 --- a/Docs/TODO.md +++ b/Docs/TODO.md @@ -27,7 +27,7 @@ - Chat -- Android: touch input is required ; HUD must run before other UI scripts ; add perms for read/write access to storage ; forbid screen rotation ; vibrate when ped is damaged ; disable left and right mouse click ; +- Android: HUD must run before other UI scripts ; add perms for read/write access to storage ; forbid screen rotation ; vibrate when ped is damaged ; disable left and right mouse click ; vehicle touch input: forward, backward, handbrake, left & right ; weapon switching buttons ; states to implement hud: fly, ; circular button for movement ; buttons which don't work: aim, sprint, walk ; - Play sounds: horn ; empty weapon slot ; ped damage ; footsteps in run and sprint states ;