Skip to content
Snippets Groups Projects
Select Git revision
  • 4144b00d5bcb25876764d9975667c2164671c7cf
  • master default
  • JS-based-scroll-rendering
  • Paul_Marius_Level
  • Paul_Marius_2
  • Paul_Marius
  • Andi_Mark
  • be-UnityWebView
  • gitignoreFrameitServer
  • ZimmerBSc
  • Bugfix_StageLoading
  • stages
  • MAZIFAU_Experimental
  • tsc/coneworld
  • tsc/fact-interaction
  • marcel
  • MaZiFAU_TopSort
  • mergeHelper
  • zwischenSpeichern
  • tempAndrToMaster
  • SebBranch
  • 3.0
  • v2.1
  • v2.0
  • v1.0
25 results

ControlOptionsMenuePreview_mobile.cs

Blame
  • ControlOptionsMenuePreview_mobile.cs 3.65 KiB
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.UI; //andr
    using UnityEngine.SceneManagement;
    using System.IO; //
    using UnityEngine.Video;//streaming
    using UnityEngine.Networking;
    
    using static UIconfig;
    
    
    
    public class ControlOptionsMenuePreview_mobile : MonoBehaviour
    {
        public GameObject ExBttnPreview1;
        public GameObject ExBttnPreview2l;
        public GameObject ExBttnPreview2r;
        public GameObject ExDpadPreview1;
        public GameObject ExDpadPreview2;
        //public GameObject 
        //public GameObject 
    
        private Color colChangeable = new Color(1f, 1f, 1f, 0.5f);
        private Color colChangeable2 = new Color(1f, 1f, 1f, 0.5f);
    
        //public GameObject TouchModeButton;
    
    
        //public GameObject back_GObj;
    
        void Start()
        {
            Update();
        }
    
        private void Update()
        {
            updateUIpreview();
        }
    
    
        
    
        public void updateUIpreview()
        {
    
            if (UIconfig.controlMode == 2)
            {
    
                colChangeable.a = UIconfig.TAvisibility;
                colChangeable2.a = (UIconfig.TAvisibility) / 5;
                switch (UIconfig.touchControlMode)
                {
                    case 1:
                        ExBttnPreview1.GetComponentInChildren<Image>().color = colChangeable;
                        ExBttnPreview2l.GetComponentInChildren<Image>().color = colChangeable;
                        ExBttnPreview2r.GetComponentInChildren<Image>().color = colChangeable;
                        ExDpadPreview1.GetComponentInChildren<Image>().color = UIconfig.colClear;
                        ExDpadPreview2.GetComponentInChildren<Image>().color = UIconfig.colClear;
                        break;
                    case 2:
                        ExBttnPreview1.GetComponentInChildren<Image>().color = UIconfig.colClear;
                        ExBttnPreview2l.GetComponentInChildren<Image>().color = UIconfig.colClear;
                        ExBttnPreview2r.GetComponentInChildren<Image>().color = UIconfig.colClear;
                        ExDpadPreview1.GetComponentInChildren<Image>().color = colChangeable2;
                        ExDpadPreview2.GetComponentInChildren<Image>().color = colChangeable2;
                        break;
                    case 3:
                        ExBttnPreview1.GetComponentInChildren<Image>().color = colChangeable;
                        ExBttnPreview2l.GetComponentInChildren<Image>().color = UIconfig.colClear;
                        ExBttnPreview2r.GetComponentInChildren<Image>().color = UIconfig.colClear;
                        ExDpadPreview1.GetComponentInChildren<Image>().color = UIconfig.colClear;
                        ExDpadPreview2.GetComponentInChildren<Image>().color = colChangeable2;
                        break;
    
    
    
                    default:
                        ExBttnPreview1.GetComponentInChildren<Image>().color = UIconfig.colClear;
                        ExBttnPreview2l.GetComponentInChildren<Image>().color = UIconfig.colClear;
                        ExBttnPreview2r.GetComponentInChildren<Image>().color = UIconfig.colClear;
                        ExDpadPreview1.GetComponentInChildren<Image>().color = UIconfig.colClear;
                        ExDpadPreview2.GetComponentInChildren<Image>().color = UIconfig.colClear;
                        break;
                }
            }
            else
            {
                ExBttnPreview1.GetComponentInChildren<Image>().color = UIconfig.colClear;
                ExBttnPreview2l.GetComponentInChildren<Image>().color = UIconfig.colClear;
                ExBttnPreview2r.GetComponentInChildren<Image>().color = UIconfig.colClear;
                ExDpadPreview1.GetComponentInChildren<Image>().color = UIconfig.colClear;
                ExDpadPreview2.GetComponentInChildren<Image>().color = UIconfig.colClear;
            }
    
    
    
    
    
        }
    
     
        
    
    }