Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        k = ResizeHelper.k;

        for (int i = 0; i < _rectsIcon.Length; i++)
        {
            _rectsIcon[i]        = new Rect(16f * k, 16f * k + i * 70f * k, 64f * k, 64f * k);
            _rectsWithIcon[i]    = new Rect(16f * k + 64f * k, 16f * k + i * 70f * k, 200f * k, 64f * k);
            _rectsWithoutIcon[i] = new Rect(16f * k, 16f * k + i * 70f * k, 200f * k + 64f * k, 64f * k);
        }

        _touch        = Camera.main.GetComponent <NewMouseController>();
        _touch.Click += HandleTouchClick;

        _details = this.GetComponent <MarkerDetailsView>();

        DescriptionBG = ResizeHelper.Make(new Color32(20, 93, 134, 255));

        var size = ResizeHelper.ButtonStyle.CalcSize(new GUIContent(Lang.Settings_Back));

        _backRect = new Rect(Screen.width - 10f * k - size.x, Screen.height - 50f * k, size.x, 50f * k);
    }
Exemplo n.º 2
0
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    void SafeInit()
    {
        if (_inited)
        {
            return;
        }
        _inited = true;

        float k = ResizeHelper.k;

        _touch            = Camera.main.GetComponent <NewMouseController>();
        _touch.Click     += HandleTouchClick;
        _touch.MouseDown += HandleMouseDown;
        _touch.MouseUp   += HandleMouseUp;
        _touch.MouseMove += HandleMouseMove;

        _markerLister = this.GetComponent <MarkersLister>();

        _darkBlue   = ResizeHelper.Make(new Color32(15, 70, 102, 255));
        _mediumBlue = ResizeHelper.Make(new Color32(20, 93, 134, 255));
        _lightBlue  = ResizeHelper.Make(new Color32(29, 133, 192, 255));

        _closeRect = new Rect(Screen.width - 30f * k, 0, 30f * k, 30f * k);
    }