Ejemplo n.º 1
0
        private void DestroyPanel()
        {
            Panel?.DestroyPanel();
            Panel = null;

            CancelInvoke("LazyUpdate");
        }
Ejemplo n.º 2
0
        private void CreatePanels(Hud hud)
        {
            _hoverPiecePanel =
                new TwoColumnPanel(hud.m_crosshair.transform, hud.m_hoverName.font)
                .SetPosition(_hoverPiecePanelPosition.Value)
                .AddPanelRow(out _pieceNameTextLabel, out _pieceNameTextValue)
                .AddPanelRow(out _pieceHealthTextLabel, out _pieceHealthTextValue)
                .AddPanelRow(out _pieceStabilityTextLabel, out _pieceStabilityTextValue)
                .AddPanelRow(out _pieceRotationTextLabel, out _pieceRotationTextValue)
                .AddPanelRow(out _pieceEulerTextLabel, out _pieceEulerTextValue);

            _pieceNameTextLabel.text      = "Piece \u25c8";
            _pieceHealthTextLabel.text    = "Health \u2661";
            _pieceStabilityTextLabel.text = "Stability \u2616";
            _pieceRotationTextLabel.text  = "Rotation \u2318";
            _pieceEulerTextLabel.text     = "Euler \u29bf";

            _placementGhostPanel =
                new TwoColumnPanel(hud.m_crosshair.transform, hud.m_hoverName.font)
                .SetPosition(_placementGhostPanelPosition.Value)
                .AddPanelRow(out _ghostNameTextLabel, out _ghostNameTextValue)
                .AddPanelRow(out _ghostRotationTextLabel, out _ghostRotationTextValue)
                .AddPanelRow(out _ghostEulerTextLabel, out _ghostEulerTextValue);

            _ghostNameTextLabel.text     = "Placing \u25a5";
            _ghostRotationTextLabel.text = "Rotation \u2318";
            _ghostEulerTextLabel.text    = "Euler \u29bf";
        }
Ejemplo n.º 3
0
        private void CreatePanel(Hud hud)
        {
            _eraserPanel =
                new TwoColumnPanel(hud.m_crosshair.transform, hud.m_hoverName.font)
                .SetPosition(new Vector2(0, 50))
                .AddPanelRow(out _eraserLabel, out _eraserValue);

            _eraserLabel.text = $"[<color=#f44336>{_deleteObjectConfig.Value}</color>]";
            _eraserValue.text = $"[Delete this object <color=#f44336>permanently</color>]";
        }
Ejemplo n.º 4
0
        private void CreatePanel(Hud hud)
        {
            Panel =
                new TwoColumnPanel(hud.m_rootObject.transform, hud.m_hoverName.font, new Color32(0, 0, 0, 96))
                .SetAnchor(new Vector2(0f, 0f))
                .SetPosition(Position.Value)
                .AddPanelRow("Time", out _envTimeValue)
                .AddPanelRow("Position", out _zonePositionValue)
                .AddPanelRow("Altitude", out _zoneAltitudeValue)
                .AddPanelRow("Sector", out _zoneSectorValue)
                .AddPanelRow("ZDOs", out _zoneZdoCountValue)
                .AddPanelRow("Tool", out _toolValue)
                .AddPanelRow("Hover", out _hoverValue)
                .AddPanelRow("Key", out _keyValue)
                .AddPanelRow("DebugMode", out _debugModeValue);

            InvokeRepeating("LazyUpdate", 1.0f, 0.5f);
        }