Пример #1
0
        protected void InitPanel()
        {
            mPanel = new Widget(this, Width, kPanelHeight);
            mPanel.Move(0, Height - kPanelHeight);
            mPanel.Name = "panel";

            mHomeButton = new TextArea(mPanel, (int)(Width * 0.88f), 0, (int)(Width * 0.11f), mPanel.Height);
            HomeVisible = false;
            mHomeButton.SetFont(Palette.Black, kFontSize);
            mHomeButton.SetAlign(Align.Right, new GfxPoint(5, 5));
            mPanel.OnRelease += caller =>
            {
                if (mHomeButton.IsVisible)
                {
                    if (OnHomeRelease != null)
                    {
                        OnHomeRelease(this);
                    }
                }
            };


            mClock = new TextArea(mPanel, 0, 0, (int)(Width * 0.11f), mPanel.Height);
            mClock.SetFont(Palette.Black, kFontSize);
            mClock.SetAlign(Align.Left, new GfxPoint(5, 5));

            mDescription = new TextArea(mPanel, mClock.Width, 0, Width - 2 * mClock.Width, mPanel.Height);
            mDescription.SetFont(Palette.Black, kFontSize);
            mDescription.SetAlign(Align.Center, new GfxPoint(4, 5));

            mPanel.AddVGPath(GetPanelPath());
        }