deactivateButtons() публичный статический Метод

Removes the focused sprite from all menu buttons
public static deactivateButtons ( ) : void
Результат void
Пример #1
0
        public void Close()
        {
            if (LoadingExtension.Instance != null)
            {
                var uiView         = UIView.GetAView();
                var trafficManager = uiView.FindUIComponent("UITrafficManager");
                if (trafficManager != null)
                {
                    Log._Debug("Hiding TM UI");
                    trafficManager.Hide();
                }
                else
                {
                    Log._Debug("Hiding TM UI: null!");
                }

                UITrafficManager.deactivateButtons();
                TrafficManagerTool.SetToolMode(ToolMode.None);
                LoadingExtension.Instance.SetToolMode(TrafficManagerMode.None);

                _uiShown = false;
            }
            else
            {
                Log._Debug("TM UI Close: LoadingExtension.Instance is null!");
            }
        }
        public void Close()
        {
            var uiView = UIView.GetAView();

            GetMenu().Hide();

            UITrafficManager.deactivateButtons();
            TrafficManagerTool.SetToolMode(ToolMode.None);
            LoadingExtension.SetToolMode(TrafficManagerMode.None);
            _uiShown = false;
            button.UpdateSprites();
        }
Пример #3
0
        public void Close()
        {
            if (LoadingExtension.Instance != null)
            {
                var uiView         = UIView.GetAView();
                var trafficManager = uiView.FindUIComponent("UITrafficManager");

                if (trafficManager != null)
                {
                    Destroy(trafficManager);
                }

                UITrafficManager.deactivateButtons();
                TrafficLightTool.SetToolMode(ToolMode.None);
                LoadingExtension.Instance.SetToolMode(TrafficManagerMode.None);

                _uiShown = false;
            }
        }
        public static void SetToolMode(ToolMode mode)
        {
            //Log._Debug($"SetToolMode: {mode}");

            if (mode == ToolMode.None)
            {
#if !TAM
                UITrafficManager.deactivateButtons();
#endif
            }

            bool toolModeChanged = (mode != _toolMode);
            if (toolModeChanged && activeSubTool != null)
            {
                if ((_toolMode == ToolMode.TimedLightsSelectNode || _toolMode == ToolMode.TimedLightsShowLights || _toolMode == ToolMode.TimedLightsAddNode || _toolMode == ToolMode.TimedLightsRemoveNode))                   // TODO refactor to SubToolMode
                {
                    if (mode != ToolMode.TimedLightsSelectNode && mode != ToolMode.TimedLightsShowLights && mode != ToolMode.TimedLightsAddNode && mode != ToolMode.TimedLightsRemoveNode)
                    {
                        activeSubTool.Cleanup();
                    }
                }
                else
                {
                    activeSubTool.Cleanup();
                }
            }
            _toolMode = mode;

            SelectedNodeId    = 0;
            SelectedSegmentId = 0;

            activeSubTool = null;
            //Log._Debug($"Getting activeSubTool for mode {_toolMode} {subTools.Count}");
            activeSubTool = subTools[(int)_toolMode];
            //subTools.TryGetValue((int)_toolMode, out activeSubTool);
            //Log._Debug($"activeSubTool is now {activeSubTool}");

            if (toolModeChanged && activeSubTool != null)
            {
                activeSubTool.OnActivate();
            }
        }