Пример #1
0
        public void BuildWidgetsFailure()
        {
            tip = "Error Occured:\n" + loadException.Message + "\nStack Trace:\n" + loadException.StackTrace;

            wr = new WidgetRenderer(G, font);

            button                = new RectButton(wr, G.Viewport.Bounds.Width - (BOUNDS_OFFSET - BACK_SIZE) * 2, BAR_HEIGHT + BACK_SIZE * 2, COLOR_BACK, Color.Red);
            button.Anchor         = new Point(G.Viewport.Bounds.Width / 2, G.Viewport.Bounds.Height - BOUNDS_OFFSET + BACK_SIZE);
            button.AlignY         = Alignment.BOTTOM;
            button.AlignX         = Alignment.MID;
            button.OnButtonPress += (b, p) => {
                State = ScreenState.ChangePrevious;
            };
            button.Hook();
            button.LayerDepth = 1f;

            text              = new TextWidget(wr, font);
            text.Parent       = button;
            text.AlignX       = Alignment.MID;
            text.AlignY       = Alignment.MID;
            text.OffsetAlignX = Alignment.MID;
            text.OffsetAlignY = Alignment.MID;
            text.Height       = button.Height;
            text.Color        = Color.White;
            text.Text         = "Back To Menu";
            text.LayerDepth   = 0.5f;
        }
Пример #2
0
        void LoadButton_OnButtonPress(RectButton arg1, Vector2 arg2)
        {
            string dir = @"Packs\" + leMenu.MapLocation;

            ReadVoxels(dir + @"\vox.world.le");
            HideLEMenu();
        }
Пример #3
0
        public void BuildWidgetsSuccess()
        {
            wr = new WidgetRenderer(G, font);

            button                = new RectButton(wr, G.Viewport.Bounds.Width - (BOUNDS_OFFSET - BACK_SIZE) * 2, BAR_HEIGHT + BACK_SIZE * 2, COLOR_BACK, Color.Green);
            button.Anchor         = new Point(G.Viewport.Bounds.Width / 2, G.Viewport.Bounds.Height - BOUNDS_OFFSET + BACK_SIZE);
            button.AlignY         = Alignment.BOTTOM;
            button.AlignX         = Alignment.MID;
            button.OnButtonPress += (b, p) => {
                State = ScreenState.ChangeNext;
            };
            button.Hook();
            button.LayerDepth = 1f;

            text              = new TextWidget(wr, font);
            text.Parent       = button;
            text.AlignX       = Alignment.MID;
            text.AlignY       = Alignment.MID;
            text.OffsetAlignX = Alignment.MID;
            text.OffsetAlignY = Alignment.MID;
            text.Height       = button.Height;
            text.Color        = Color.White;
            text.Text         = "Play Game";
            text.LayerDepth   = 0.5f;
        }
Пример #4
0
    // Добавление кнопки выбора цвета
    public void add_col_sel_btn()
    {
        col_sel_btn = add_child(typeof(RectButton), "SelColorBtn");
        RectButton col_sel_comp = col_sel_btn.GetComponent <RectButton>();

        col_sel_comp.set_size(new RectSize(128, 85));
        col_sel_comp.set_pos(new Vector2(0, get_size().height - 64 - 40));
        col_sel_comp.set_icon(Scene.get_sprite("col_sel_btn"));

        col_sel_comp.on_mouse_enter = () => {
            col_sel_comp.set_icon(Scene.get_sprite("col_sel_enter"));
        };

        col_sel_comp.on_mouse_exit = () => {
            col_sel_comp.set_icon(Scene.get_sprite("col_sel_btn"));
        };

        col_sel_comp.btn.onClick.AddListener(() => {
            StartCoroutine(Funcs.play_sound(gameObject, "btn_click"));

            if (Display.color_wnd == null)
            {
                Display.color_wnd_open();
            }
            else
            {
                Display.color_wnd_close();
            }
        });
    }
Пример #5
0
        public RTSUnitDataPanel(RTSRenderer renderer, WidgetRenderer wr, UICUnitData _uic, UICCombatStats _uicCS)
        {
            uic     = _uic;
            iconLib = renderer.IconLibrary;

            WidgetBase        = new RectWidget(wr, renderer.LoadTexture2D(uic.PanelImage));
            WidgetBase.Width  = uic.PanelSize.X;
            WidgetBase.Height = uic.PanelSize.Y;
            WidgetBase.Color  = uic.PanelColor;

            icon        = new RectWidget(wr);
            icon.Width  = uic.IconSize;
            icon.Height = uic.IconSize;
            icon.Color  = Color.White;
            icon.Offset = new Point(uic.IconBuffer, uic.IconBuffer);
            icon.Parent = WidgetBase;

            rectHealthBack              = new RectWidget(wr);
            rectHealthBack.Width        = uic.IconSize;
            rectHealthBack.Height       = uic.HealthHeight;
            rectHealthBack.AlignX       = Alignment.MID;
            rectHealthBack.OffsetAlignX = Alignment.MID;
            rectHealthBack.OffsetAlignY = Alignment.BOTTOM;
            rectHealthBack.Offset       = new Point(0, uic.IconBuffer);
            rectHealthBack.Color        = UserConfig.MainScheme.WidgetBorder;
            rectHealthBack.Parent       = icon;

            rectHealthFore              = new RectWidget(wr);
            rectHealthFore.Width        = uic.IconSize;
            rectHealthFore.Height       = uic.HealthHeight;
            rectHealthFore.AlignX       = Alignment.MID;
            rectHealthFore.AlignY       = Alignment.MID;
            rectHealthFore.OffsetAlignX = Alignment.MID;
            rectHealthFore.OffsetAlignY = Alignment.MID;
            rectHealthFore.Offset       = new Point(0, 0);
            rectHealthFore.Color        = uic.HealthMaxColor;
            rectHealthFore.Parent       = rectHealthBack;

            txtName              = new TextWidget(wr);
            txtName.Height       = uic.TextHeight;
            txtName.OffsetAlignX = Alignment.RIGHT;
            txtName.Offset       = new Point(uic.IconBuffer, 0);
            txtName.Color        = UserConfig.MainScheme.Text;
            txtName.Parent       = icon;

            combatData              = new RectButton(wr, uic.CombatSize, uic.CombatSize, Color.Gray, Color.White, renderer.LoadTexture2D(uic.CombatImage));
            combatData.AlignX       = Alignment.RIGHT;
            combatData.AlignY       = Alignment.BOTTOM;
            combatData.OffsetAlignX = Alignment.RIGHT;
            combatData.OffsetAlignY = Alignment.BOTTOM;
            combatData.Parent       = WidgetBase;

            uiCStats = new RTSUICombatStats(wr, _uicCS);
            uiCStats.WidgetBase.AlignY = Alignment.BOTTOM;
            uiCStats.WidgetBase.Anchor = new Point(1000000, 1000000);

            uiCSHover = new RTSUIHoverPanel(combatData, uiCStats.WidgetBase);
        }
Пример #6
0
        void SaveButton_OnButtonPress(RectButton arg1, Vector2 arg2)
        {
            string dir = @"Packs\" + leMenu.MapLocation;
            int    w   = leMenu.MapWidth;
            int    h   = leMenu.MapHeight;

            Write(dir, w, h);
            HideLEMenu();
        }
Пример #7
0
        public RTSUIHoverPanel(RectButton b, BaseWidget p)
        {
            TargetButton = b;
            PanelWidget  = p;

            TargetButton.OnMouseEntry += TargetButton_OnMouseEntry;
            TargetButton.OnMouseExit  += TargetButton_OnMouseExit;
            shouldShow = false;
        }
Пример #8
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.textBox1 = new System.Windows.Forms.TextBox();
     this.button1 = new System.Windows.Forms.Button();
     this.roundRect1 = new Mndz.RectButton();
     this.SuspendLayout();
     //
     // textBox1
     //
     this.textBox1.BackColor = System.Drawing.Color.Bisque;
     this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
     this.textBox1.Font = new System.Drawing.Font("Arial", 26F, System.Drawing.FontStyle.Regular);
     this.textBox1.ForeColor = System.Drawing.Color.Red;
     this.textBox1.Location = new System.Drawing.Point(3, 3);
     this.textBox1.Multiline = true;
     this.textBox1.Name = "textBox1";
     this.textBox1.ReadOnly = true;
     this.textBox1.Size = new System.Drawing.Size(507, 156);
     this.textBox1.TabIndex = 21;
     this.textBox1.Text = "Message";
     //
     // button1
     //
     this.button1.BackColor = System.Drawing.Color.Bisque;
     this.button1.Font = new System.Drawing.Font("Tahoma", 20F, System.Drawing.FontStyle.Regular);
     this.button1.ForeColor = System.Drawing.Color.Black;
     this.button1.Location = new System.Drawing.Point(145, 187);
     this.button1.Name = "button1";
     this.button1.Size = new System.Drawing.Size(210, 52);
     this.button1.TabIndex = 22;
     this.button1.Text = "button1";
     this.button1.Click += new System.EventHandler(this.button1_Click);
     //
     // roundRect1
     //
     this.roundRect1.BackColor = System.Drawing.Color.Bisque;
     this.roundRect1.bOn = true;
     this.roundRect1.Location = new System.Drawing.Point(3, 0);
     this.roundRect1.Name = "roundRect1";
     this.roundRect1.Size = new System.Drawing.Size(507, 259);
     this.roundRect1.TabIndex = 20;
     //
     // MsgDlg
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
     this.AutoScroll = true;
     this.ClientSize = new System.Drawing.Size(512, 262);
     this.ControlBox = false;
     this.Controls.Add(this.button1);
     this.Controls.Add(this.textBox1);
     this.Controls.Add(this.roundRect1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name = "MsgDlg";
     this.TopMost = true;
     this.ResumeLayout(false);
 }
Пример #9
0
 private void OnBPDown(RectButton button, Vector2 p)
 {
     row++;
     if (row * 3 > buttons.Length)
     {
         row = 0;
     }
     ViewRow(row);
 }
Пример #10
0
 private void OnBPUp(RectButton button, Vector2 p)
 {
     row--;
     if (row < 0)
     {
         row = (buttons.Length - 1) / 3;
     }
     ViewRow(row);
 }
Пример #11
0
        void bFinish_OnButtonPress(RectButton obj, Vector2 m)
        {
            string n = tInput.Text;

            if (!n.Equals(UserConfig.DEFAULT_USER_NAME) && !string.IsNullOrWhiteSpace(n))
            {
                UserConfig.UserName = n;
                State = ScreenState.ChangeNext;
            }
        }
Пример #12
0
    // Кнопка выкл музыки
    public void add_sound_btn()
    {
        sound_btn = add_child(typeof(RectButton));
        RectButton sound_btn_comp = sound_btn.GetComponent <RectButton>();

        sound_btn_comp.set_size(new RectSize(64, 64));
        sound_btn_comp.set_pos(new Vector2(720, 20));
        sound_btn_comp.set_icon(Scene.get_sprite("play_sound"));

        sound_btn_comp.btn.onClick.AddListener(() => {
            StartCoroutine(Funcs.play_sound(gameObject, "btn_click"));

            Scene.toggle_music(scene_obj, "game_music");
        });
    }
Пример #13
0
        public override void OnEntry(GameTime gameTime)
        {
            KeyboardEventDispatcher.OnKeyPressed += KeyboardEventDispatcher_OnKeyPressed;

            font = game.Content.Load <SpriteFont>(@"Fonts\CourierNew32");
            wr   = new WidgetRenderer(G, font);

            wUsername        = new TextWidget(wr);
            wUsername.Anchor = new Point(G.Viewport.Width / 2, G.Viewport.Height / 2);
            wUsername.AlignY = Alignment.BOTTOM;
            wUsername.AlignX = Alignment.MID;
            wUsername.Color  = Color.White;
            wUsername.Height = 32;

            ButtonHighlightOptions h1 = new ButtonHighlightOptions(100, 30, Color.Red);
            ButtonHighlightOptions h2 = new ButtonHighlightOptions(100, 30, Color.Green);

            bFinish = new RectButton(wr, h1, h2);
            bFinish.OffsetAlignY   = Alignment.BOTTOM;
            bFinish.OffsetAlignX   = Alignment.MID;
            bFinish.AlignX         = Alignment.MID;
            bFinish.Offset         = new Point(0, 0);
            bFinish.Parent         = wUsername;
            bFinish.OnButtonPress += bFinish_OnButtonPress;
            bFinish.Hook();

            txtLogin              = new TextWidget(wr);
            txtLogin.Height       = bFinish.Height;
            txtLogin.Text         = "Login";
            txtLogin.Color        = Color.Black;
            txtLogin.AlignX       = Alignment.MID;
            txtLogin.AlignY       = Alignment.MID;
            txtLogin.OffsetAlignX = Alignment.MID;
            txtLogin.OffsetAlignY = Alignment.MID;
            txtLogin.Parent       = bFinish;

            tInput = new TextInput();
            tInput.OnTextChanged += tInput_OnTextChanged;
            tInput.Activate();
            tInput.Text = UserConfig.UserName;

            if (UserConfig.UserName.Equals(UserConfig.DEFAULT_USER_NAME))
            {
                // Must Create A Default User Name
                wUsername.Text = "Please Enter A New Username";
            }
        }
Пример #14
0
        public RTSUIMinimap(RTSRenderer renderer, WidgetRenderer wr, Texture2D tPhys, Texture2D tImp, UICMinimap uic)
        {
            tPhysical = tPhys;
            tImpact   = tImp;

            WidgetBase        = new RectWidget(wr);
            WidgetBase.Width  = uic.ButtonWidth + uic.MapSize + uic.Buffer * 2;
            WidgetBase.Height = uic.MapSize + uic.Buffer * 2;
            WidgetBase.Color  = uic.BaseColor;

            int bh = uic.MapSize / 2;

            btnPhysical = new RectButton(wr, uic.ButtonWidth, bh,
                                         uic.PhysicalInactiveColor,
                                         uic.PhysicalActiveColor,
                                         renderer.LoadTexture2D(uic.PhysicalTexture)
                                         );
            btnImpact = new RectButton(wr, uic.ButtonWidth, bh,
                                       uic.ImpactInactiveColor,
                                       uic.ImpactActiveColor,
                                       renderer.LoadTexture2D(uic.ImpactTexture)
                                       );

            btnPhysical.Offset     = new Point(uic.Buffer, uic.Buffer);
            btnPhysical.Parent     = WidgetBase;
            btnImpact.OffsetAlignY = Alignment.BOTTOM;
            btnImpact.Parent       = btnPhysical;

            MapRect              = new RectWidget(wr, tPhysical);
            MapRect.Width        = uic.MapSize;
            MapRect.Height       = uic.MapSize;
            MapRect.Color        = Color.White;
            MapRect.OffsetAlignX = Alignment.RIGHT;
            MapRect.Parent       = btnPhysical;

            btnPhysical.OnButtonPress += (b, p) => {
                MapRect.Texture = tPhysical;
            };
            btnImpact.OnButtonPress += (b, p) => {
                MapRect.Texture = tImpact;
            };
        }
Пример #15
0
    // Кнопка играть снова
    public void add_respawn_btn()
    {
        respawn_btn = add_child(typeof(RectButton));
        RectButton respawn_btn_comp = respawn_btn.GetComponent <RectButton>();

        respawn_btn_comp.set_size(new RectSize(160, 47.8f));
        respawn_btn_comp.set_pos(new Vector2(71.7f, 201.6f));
        respawn_btn_comp.btn_bg_alpha = btn_alpha;
        respawn_btn_comp.add_image(new Color(255, 255, 255));

        respawn_btn_comp.on_mouse_down = () => {
            StartCoroutine(Funcs.play_sound(gameObject.transform.parent.gameObject, "btn_click"));
        };

        respawn_btn_comp.btn.onClick.AddListener(() => {
            Display.stats_wnd_close();

            Scene scn   = scene_obj.GetComponent <Scene>();
            scn.is_play = true;
        });
    }
Пример #16
0
    // Добавление кнопки Старт
    public void add_start_btn()
    {
        start_btn = add_child(typeof(RectButton), "StartBtn");
        RectButton start_btn_comp = start_btn.GetComponent <RectButton>();

        start_btn_comp.set_size(new RectSize(256, 211));
        start_btn_comp.set_pos(new Vector2(get_size().width / 2 - 128, get_size().height - 180));
        start_btn_comp.set_icon(Scene.get_sprite("start_btn"));

        start_btn_comp.on_mouse_down = () => {
            start_btn_comp.set_icon(Scene.get_sprite("start_btn_down"));

            StartCoroutine(Funcs.play_sound(gameObject, "btn_click"));
        };

        start_btn_comp.btn.onClick.AddListener(() => {
            Display.menu_wnd_close();

            Scene scn   = scene_obj.GetComponent <Scene>();
            scn.is_play = true;
        });
    }
Пример #17
0
        protected override void Start()
        {
            RectButton rectButton = SkiaBehaviourEngine.Instantiate <RectButton>();

            rectButton.RectTransform.AnchorMax = new SKPoint(0, 0);
            rectButton.RectTransform.AnchorMin = new SKPoint(0, 0);
            rectButton.RectTransform.OffsetMax = new SKPoint(1000, 1000);
            rectButton.RectTransform.OffsetMin = new SKPoint(500, 250);

            ColorJoystick colorJoystick = SkiaBehaviourEngine.Instantiate <ColorJoystick>();

            colorJoystick.RectTransform.AnchorMax = new SKPoint(0, 0);
            colorJoystick.RectTransform.AnchorMin = new SKPoint(0, 0);
            colorJoystick.RectTransform.OffsetMax = new SKPoint(2000, 500);
            colorJoystick.RectTransform.OffsetMin = new SKPoint(500, 250);

            /*
             * RectButton rectButton = SkiaBehaviourEngine.Instantiate<RectButton>();
             * rectButton.RectTransform.AnchorMin = new SKPoint(0, 0);
             * rectButton.RectTransform.AnchorMax = new SKPoint(0, 0);
             * rectButton.RectTransform.OffsetMin = new SKPoint(33.49999f, 33);
             * rectButton.RectTransform.OffsetMax = new SKPoint(143.9f, 80);*/

            RectButton rectButton2 = SkiaBehaviourEngine.Instantiate <RectButton>();

            rectButton2.RectTransform.AnchorMin = new SKPoint(1, 0);
            rectButton2.RectTransform.AnchorMax = new SKPoint(1, 0);
            rectButton2.RectTransform.OffsetMin = new SKPoint(-148.9f, 27.79999f);
            rectButton2.RectTransform.OffsetMax = new SKPoint(-38.49998f, 74.79999f);
            RectButton rectButton3 = SkiaBehaviourEngine.Instantiate <RectButton>();

            rectButton3.RectTransform.AnchorMin = new SKPoint(0.5f, 1);
            rectButton3.RectTransform.AnchorMax = new SKPoint(0.5f, 1);
            rectButton3.RectTransform.OffsetMin = new SKPoint(-47.8f, -102.4f);
            rectButton3.RectTransform.OffsetMax = new SKPoint(62.59999f, -55.40002f);
        }
Пример #18
0
        public override void OnEntry(GameTime gameTime)
        {
            SpriteFont f = game.Content.Load <SpriteFont>(uic.Font);

            wr = new WidgetRenderer(G, f);

            using (var s = File.OpenRead(uic.SoundHover)) {
                seHover = SoundEffect.FromStream(s);
            }

            // List Of Possible Button Actions
            Action <RectButton, Vector2>[] fBPs =
            {
                OnBPPlay,
                OnBPOptions,
                OnBPArmyPainter,
                OnBPLevelEditor,
                OnBPExit
            };

            buttons     = new RectButton[uic.Buttons.Length];
            buttonsText = new TextWidget[buttons.Length];
            tPanels     = new Texture2D[buttons.Length + 2];
            int bw = G.Viewport.Width;

            bw -= 5 * uic.ButtonSpacing.X;
            bw /= 4;
            int bh = G.Viewport.Height - uic.ButtonSpacing.Y * 3 - uic.TitlePanelTextSize;

            for (int i = 0; i < buttons.Length; i++)
            {
                var uicButton = uic.Buttons[i];
                using (var s = File.OpenRead(uicButton.ImageFile)) {
                    tPanels[i] = Texture2D.FromStream(G, s);
                }
                buttons[i] = new RectButton(wr, bw, bh, uicButton.ColorInactive, uicButton.ColorActive, tPanels[i]);
                buttons[i].Hook();
                buttons[i].OnButtonPress += MenuScreen_OnButtonPress;
                buttons[i].OnButtonPress += fBPs[uicButton.ActionIndex];
                buttons[i].OnMouseEntry  += MenuScreen_OnMouseEntry;
                buttons[i].LayerDepth     = 1f;
                buttons[i].OffsetAlignX   = Alignment.RIGHT;
                buttons[i].Offset         = new Point(uic.ButtonSpacing.X, 0);
                if (i % 3 != 0)
                {
                    buttons[i].Parent = buttons[i - 1];
                }

                buttonsText[i]              = new TextWidget(wr);
                buttonsText[i].Font         = f;
                buttonsText[i].OffsetAlignX = Alignment.MID;
                buttonsText[i].OffsetAlignY = Alignment.TOP;
                buttonsText[i].Offset       = new Point(0, 30);
                buttonsText[i].AlignX       = Alignment.MID;
                buttonsText[i].AlignY       = Alignment.MID;
                buttonsText[i].Parent       = buttons[i];
                buttonsText[i].LayerDepth   = 0.9f;
                buttonsText[i].Color        = uicButton.ColorText;
                buttonsText[i].Height       = uic.ButtonTextSize;
                buttonsText[i].Text         = uicButton.Text;
            }
            using (var s = File.OpenRead(uic.ButtonImageUp)) {
                tPanels[buttons.Length] = Texture2D.FromStream(G, s);
            }
            btnUp                = new RectButton(wr, bw, bh / 2, uic.ButtonUDInactiveColor, uic.ButtonUDActiveColor, tPanels[buttons.Length]);
            btnUp.Offset         = new Point((bw + uic.ButtonSpacing.X) * 3, 0);
            btnUp.OnButtonPress += MenuScreen_OnButtonPress;
            btnUp.OnMouseEntry  += MenuScreen_OnMouseEntry;
            btnUp.OnButtonPress += OnBPUp;
            btnUp.Hook();
            using (var s = File.OpenRead(uic.ButtonImageDown)) {
                tPanels[buttons.Length + 1] = Texture2D.FromStream(G, s);
            }
            btnDown = new RectButton(wr, bw, bh / 2, uic.ButtonUDInactiveColor, uic.ButtonUDActiveColor, tPanels[buttons.Length + 1]);
            btnDown.OffsetAlignY   = Alignment.BOTTOM;
            btnDown.Parent         = btnUp;
            btnDown.OnButtonPress += MenuScreen_OnButtonPress;
            btnDown.OnMouseEntry  += MenuScreen_OnMouseEntry;
            btnDown.OnButtonPress += OnBPDown;
            btnDown.Hook();

            row = 0;
            ViewRow(row);

            txtMainMenu        = new TextWidget(wr);
            txtMainMenu.Anchor = new Point(G.Viewport.Width / 2, uic.ButtonSpacing.Y);
            txtMainMenu.Height = uic.TitlePanelTextSize;
            txtMainMenu.AlignX = Alignment.MID;
            txtMainMenu.Color  = uic.ColorTitleText;
            txtMainMenu.Text   = uic.TitlePanelText;

            KeyboardEventDispatcher.OnKeyPressed += OnKeyPressed;
        }
Пример #19
0
 /// <summary> 
 /// Required method for Designer support - do not modify 
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.notelabel = new System.Windows.Forms.Label();
     this.btn_choice12 = new Mndz.RectButton();
     this.btn_choice11 = new Mndz.RectButton();
     this.btn_choice10 = new Mndz.RectButton();
     this.btn_choice9 = new Mndz.RectButton();
     this.btn_quit = new Mndz.RectButton();
     this.btn_choice8 = new Mndz.RectButton();
     this.btn_choice7 = new Mndz.RectButton();
     this.btn_choice6 = new Mndz.RectButton();
     this.btn_choice5 = new Mndz.RectButton();
     this.btn_choice4 = new Mndz.RectButton();
     this.btn_choice3 = new Mndz.RectButton();
     this.btn_choice2 = new Mndz.RectButton();
     this.btn_choice1 = new Mndz.RectButton();
     this.SuspendLayout();
     //
     // notelabel
     //
     this.notelabel.Font = new System.Drawing.Font("Arial", 18F, System.Drawing.FontStyle.Regular);
     this.notelabel.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
     this.notelabel.Location = new System.Drawing.Point(3, 17);
     this.notelabel.Name = "notelabel";
     this.notelabel.Size = new System.Drawing.Size(366, 54);
     this.notelabel.Text = "Please select item";
     //
     // btn_choice12
     //
     this.btn_choice12.BackColor = System.Drawing.Color.Blue;
     this.btn_choice12.bEnabled = true;
     this.btn_choice12.bOn = true;
     this.btn_choice12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
     this.btn_choice12.Location = new System.Drawing.Point(260, 492);
     this.btn_choice12.Name = "btn_choice12";
     this.btn_choice12.Size = new System.Drawing.Size(500, 300);
     this.btn_choice12.TabIndex = 0;
     //
     // btn_choice11
     //
     this.btn_choice11.BackColor = System.Drawing.Color.Blue;
     this.btn_choice11.bEnabled = true;
     this.btn_choice11.bOn = true;
     this.btn_choice11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
     this.btn_choice11.Location = new System.Drawing.Point(260, 420);
     this.btn_choice11.Name = "btn_choice11";
     this.btn_choice11.Size = new System.Drawing.Size(500, 300);
     this.btn_choice11.TabIndex = 1;
     //
     // btn_choice10
     //
     this.btn_choice10.BackColor = System.Drawing.Color.Blue;
     this.btn_choice10.bEnabled = true;
     this.btn_choice10.bOn = true;
     this.btn_choice10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
     this.btn_choice10.Location = new System.Drawing.Point(260, 344);
     this.btn_choice10.Name = "btn_choice10";
     this.btn_choice10.Size = new System.Drawing.Size(500, 300);
     this.btn_choice10.TabIndex = 2;
     //
     // btn_choice9
     //
     this.btn_choice9.BackColor = System.Drawing.Color.Blue;
     this.btn_choice9.bEnabled = true;
     this.btn_choice9.bOn = true;
     this.btn_choice9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
     this.btn_choice9.Location = new System.Drawing.Point(260, 266);
     this.btn_choice9.Name = "btn_choice9";
     this.btn_choice9.Size = new System.Drawing.Size(500, 300);
     this.btn_choice9.TabIndex = 3;
     //
     // btn_quit
     //
     this.btn_quit.BackColor = System.Drawing.Color.Blue;
     this.btn_quit.bEnabled = true;
     this.btn_quit.bOn = true;
     this.btn_quit.Location = new System.Drawing.Point(369, 0);
     this.btn_quit.Name = "btn_quit";
     this.btn_quit.Size = new System.Drawing.Size(71, 71);
     this.btn_quit.TabIndex = 4;
     //
     // btn_choice8
     //
     this.btn_choice8.BackColor = System.Drawing.Color.Blue;
     this.btn_choice8.bEnabled = true;
     this.btn_choice8.bOn = true;
     this.btn_choice8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
     this.btn_choice8.Location = new System.Drawing.Point(260, 193);
     this.btn_choice8.Name = "btn_choice8";
     this.btn_choice8.Size = new System.Drawing.Size(500, 300);
     this.btn_choice8.TabIndex = 6;
     //
     // btn_choice7
     //
     this.btn_choice7.BackColor = System.Drawing.Color.Blue;
     this.btn_choice7.bEnabled = true;
     this.btn_choice7.bOn = true;
     this.btn_choice7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
     this.btn_choice7.Location = new System.Drawing.Point(260, 107);
     this.btn_choice7.Name = "btn_choice7";
     this.btn_choice7.Size = new System.Drawing.Size(500, 300);
     this.btn_choice7.TabIndex = 7;
     //
     // btn_choice6
     //
     this.btn_choice6.BackColor = System.Drawing.Color.Blue;
     this.btn_choice6.bEnabled = true;
     this.btn_choice6.bOn = true;
     this.btn_choice6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
     this.btn_choice6.Location = new System.Drawing.Point(33, 492);
     this.btn_choice6.Name = "btn_choice6";
     this.btn_choice6.Size = new System.Drawing.Size(500, 300);
     this.btn_choice6.TabIndex = 8;
     //
     // btn_choice5
     //
     this.btn_choice5.BackColor = System.Drawing.Color.Blue;
     this.btn_choice5.bEnabled = true;
     this.btn_choice5.bOn = true;
     this.btn_choice5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
     this.btn_choice5.Location = new System.Drawing.Point(33, 420);
     this.btn_choice5.Name = "btn_choice5";
     this.btn_choice5.Size = new System.Drawing.Size(500, 300);
     this.btn_choice5.TabIndex = 9;
     //
     // btn_choice4
     //
     this.btn_choice4.BackColor = System.Drawing.Color.Blue;
     this.btn_choice4.bEnabled = true;
     this.btn_choice4.bOn = true;
     this.btn_choice4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
     this.btn_choice4.Location = new System.Drawing.Point(33, 344);
     this.btn_choice4.Name = "btn_choice4";
     this.btn_choice4.Size = new System.Drawing.Size(500, 300);
     this.btn_choice4.TabIndex = 10;
     //
     // btn_choice3
     //
     this.btn_choice3.BackColor = System.Drawing.Color.Blue;
     this.btn_choice3.bEnabled = true;
     this.btn_choice3.bOn = true;
     this.btn_choice3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
     this.btn_choice3.Location = new System.Drawing.Point(33, 266);
     this.btn_choice3.Name = "btn_choice3";
     this.btn_choice3.Size = new System.Drawing.Size(500, 300);
     this.btn_choice3.TabIndex = 11;
     //
     // btn_choice2
     //
     this.btn_choice2.BackColor = System.Drawing.Color.Blue;
     this.btn_choice2.bEnabled = true;
     this.btn_choice2.bOn = true;
     this.btn_choice2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
     this.btn_choice2.Location = new System.Drawing.Point(33, 193);
     this.btn_choice2.Name = "btn_choice2";
     this.btn_choice2.Size = new System.Drawing.Size(500, 300);
     this.btn_choice2.TabIndex = 12;
     //
     // btn_choice1
     //
     this.btn_choice1.BackColor = System.Drawing.Color.Blue;
     this.btn_choice1.bEnabled = true;
     this.btn_choice1.bOn = true;
     this.btn_choice1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold);
     this.btn_choice1.Location = new System.Drawing.Point(33, 107);
     this.btn_choice1.Name = "btn_choice1";
     this.btn_choice1.Size = new System.Drawing.Size(500, 300);
     this.btn_choice1.TabIndex = 13;
     //
     // ChoiceWnd
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
     this.BackColor = System.Drawing.Color.Black;
     this.ClientSize = new System.Drawing.Size(440, 554);
     this.ControlBox = false;
     this.Controls.Add(this.btn_choice12);
     this.Controls.Add(this.btn_choice11);
     this.Controls.Add(this.btn_choice10);
     this.Controls.Add(this.btn_choice9);
     this.Controls.Add(this.btn_quit);
     this.Controls.Add(this.notelabel);
     this.Controls.Add(this.btn_choice8);
     this.Controls.Add(this.btn_choice7);
     this.Controls.Add(this.btn_choice6);
     this.Controls.Add(this.btn_choice5);
     this.Controls.Add(this.btn_choice4);
     this.Controls.Add(this.btn_choice3);
     this.Controls.Add(this.btn_choice2);
     this.Controls.Add(this.btn_choice1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.Name = "ChoiceWnd";
     this.TopMost = true;
     this.ResumeLayout(false);
 }
Пример #20
0
    // Добавление кнопок смены цвета
    public void add_col_btns()
    {
        blue_col = add_child(typeof(RectButton));
        RectButton blue_col_comp = blue_col.GetComponent <RectButton>();

        blue_col_comp.set_size(new RectSize(104, 74));
        blue_col_comp.set_pos(new Vector2(186, 200));
        blue_col_comp.btn_bg_alpha = btn_alpha;
        blue_col_comp.add_image(new Color(255, 255, 255));

        blue_col_comp.on_mouse_down = () => {
            StartCoroutine(Funcs.play_sound(gameObject.transform.parent.gameObject, "col_select"));
        };

        blue_col_comp.btn.onClick.AddListener(() => {
            set_col(BrushCols.Blue);
        });

        red_col = add_child(typeof(RectButton));
        RectButton red_col_comp = red_col.GetComponent <RectButton>();

        red_col_comp.set_size(new RectSize(104, 74));
        red_col_comp.set_pos(new Vector2(268, 123));
        red_col_comp.btn_bg_alpha = btn_alpha;
        red_col_comp.add_image(new Color(255, 255, 255));

        red_col_comp.on_mouse_down = () => {
            StartCoroutine(Funcs.play_sound(gameObject.transform.parent.gameObject, "col_select"));
        };

        red_col_comp.btn.onClick.AddListener(() => {
            set_col(BrushCols.Red);
        });

        white_col = add_child(typeof(RectButton));
        RectButton white_col_comp = white_col.GetComponent <RectButton>();

        white_col_comp.set_size(new RectSize(104, 74));
        white_col_comp.set_pos(new Vector2(377, 116));
        white_col_comp.btn_bg_alpha = btn_alpha;
        white_col_comp.add_image(new Color(255, 255, 255));

        white_col_comp.on_mouse_down = () => {
            StartCoroutine(Funcs.play_sound(gameObject.transform.parent.gameObject, "col_select"));
        };

        white_col_comp.btn.onClick.AddListener(() => {
            set_col(BrushCols.White);
        });

        yellow_col = add_child(typeof(RectButton));
        RectButton yellow_col_comp = yellow_col.GetComponent <RectButton>();

        yellow_col_comp.set_size(new RectSize(104, 74));
        yellow_col_comp.set_pos(new Vector2(481, 136));
        yellow_col_comp.btn_bg_alpha = btn_alpha;
        yellow_col_comp.add_image(new Color(255, 255, 255));

        yellow_col_comp.on_mouse_down = () => {
            StartCoroutine(Funcs.play_sound(gameObject.transform.parent.gameObject, "col_select"));
        };

        yellow_col_comp.btn.onClick.AddListener(() => {
            set_col(BrushCols.Yellow);
        });

        black_col = add_child(typeof(RectButton));
        RectButton black_col_comp = black_col.GetComponent <RectButton>();

        black_col_comp.set_size(new RectSize(104, 74));
        black_col_comp.set_pos(new Vector2(473, 262));
        black_col_comp.btn_bg_alpha = btn_alpha;
        black_col_comp.add_image(new Color(255, 255, 255));

        black_col_comp.on_mouse_down = () => {
            StartCoroutine(Funcs.play_sound(gameObject.transform.parent.gameObject, "col_select"));
        };

        black_col_comp.btn.onClick.AddListener(() => {
            set_col(BrushCols.Black);
        });

        green_col = add_child(typeof(RectButton));
        RectButton green_col_comp = green_col.GetComponent <RectButton>();

        green_col_comp.set_size(new RectSize(104, 74));
        green_col_comp.set_pos(new Vector2(431, 373));
        green_col_comp.btn_bg_alpha = btn_alpha;
        green_col_comp.add_image(new Color(255, 255, 255));

        green_col_comp.on_mouse_down = () => {
            StartCoroutine(Funcs.play_sound(gameObject.transform.parent.gameObject, "col_select"));
        };

        green_col_comp.btn.onClick.AddListener(() => {
            set_col(BrushCols.Green);
        });
    }
Пример #21
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.notelabel = new System.Windows.Forms.Label();
     this.datalabel = new System.Windows.Forms.Label();
     this.panel1 = new System.Windows.Forms.Panel();
     this.btn_quit = new Mndz7.RectButton();
     this.btn_numP = new Mndz7.RectButton();
     this.btn_num3 = new Mndz7.RectButton();
     this.btn_numN = new Mndz7.RectButton();
     this.btn_num0 = new Mndz7.RectButton();
     this.btn_num9 = new Mndz7.RectButton();
     this.btn_num1 = new Mndz7.RectButton();
     this.btn_backspace = new Mndz7.RectButton();
     this.btn_num2 = new Mndz7.RectButton();
     this.btn_num8 = new Mndz7.RectButton();
     this.btn_ok = new Mndz7.RectButton();
     this.btn_num7 = new Mndz7.RectButton();
     this.btn_num4 = new Mndz7.RectButton();
     this.btn_num6 = new Mndz7.RectButton();
     this.btn_num5 = new Mndz7.RectButton();
     this.btn_clr = new Mndz7.RectButton();
     this.roundRect1 = new Mndz7.RectButton();
     this.btn_kscale = new Mndz7.RectButton();
     this.btn_mscale = new Mndz7.RectButton();
     this.btn_gscale = new Mndz7.RectButton();
     this.panel1.SuspendLayout();
     this.SuspendLayout();
     //
     // notelabel
     //
     this.notelabel.Font = new System.Drawing.Font("Arial", 18F, System.Drawing.FontStyle.Regular);
     this.notelabel.Location = new System.Drawing.Point(3, 0);
     this.notelabel.Name = "notelabel";
     this.notelabel.Size = new System.Drawing.Size(343, 54);
     this.notelabel.Text = "label1";
     //
     // datalabel
     //
     this.datalabel.BackColor = System.Drawing.Color.Moccasin;
     this.datalabel.Font = new System.Drawing.Font("Arial", 36F, System.Drawing.FontStyle.Regular);
     this.datalabel.ForeColor = System.Drawing.Color.Red;
     this.datalabel.Location = new System.Drawing.Point(34, 66);
     this.datalabel.Name = "datalabel";
     this.datalabel.Size = new System.Drawing.Size(415, 54);
     this.datalabel.Text = "label1";
     this.datalabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
     //
     // panel1
     //
     this.panel1.BackColor = System.Drawing.Color.Transparent;
     this.panel1.Controls.Add(this.btn_quit);
     this.panel1.Controls.Add(this.notelabel);
     this.panel1.Controls.Add(this.btn_numP);
     this.panel1.Controls.Add(this.btn_num3);
     this.panel1.Controls.Add(this.btn_numN);
     this.panel1.Controls.Add(this.btn_gscale);
     this.panel1.Controls.Add(this.btn_mscale);
     this.panel1.Controls.Add(this.btn_kscale);
     this.panel1.Controls.Add(this.btn_num0);
     this.panel1.Controls.Add(this.btn_num9);
     this.panel1.Controls.Add(this.btn_num1);
     this.panel1.Controls.Add(this.btn_backspace);
     this.panel1.Controls.Add(this.btn_num2);
     this.panel1.Controls.Add(this.btn_num8);
     this.panel1.Controls.Add(this.btn_ok);
     this.panel1.Controls.Add(this.btn_num7);
     this.panel1.Controls.Add(this.btn_num4);
     this.panel1.Controls.Add(this.btn_num6);
     this.panel1.Controls.Add(this.btn_num5);
     this.panel1.Controls.Add(this.btn_clr);
     this.panel1.Location = new System.Drawing.Point(0, 2);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(494, 471);
     //
     // btn_quit
     //
     this.btn_quit.BackColor = System.Drawing.Color.Blue;
     this.btn_quit.bEnabled = true;
     this.btn_quit.bOn = true;
     this.btn_quit.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
     this.btn_quit.Location = new System.Drawing.Point(372, 381);
     this.btn_quit.Name = "btn_quit";
     this.btn_quit.Size = new System.Drawing.Size(86, 77);
     this.btn_quit.TabIndex = 0;
     //
     // btn_numP
     //
     this.btn_numP.BackColor = System.Drawing.Color.Blue;
     this.btn_numP.bEnabled = true;
     this.btn_numP.bOn = true;
     this.btn_numP.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_numP.Location = new System.Drawing.Point(260, 381);
     this.btn_numP.Name = "btn_numP";
     this.btn_numP.Size = new System.Drawing.Size(86, 77);
     this.btn_numP.TabIndex = 1;
     //
     // btn_num3
     //
     this.btn_num3.BackColor = System.Drawing.Color.Blue;
     this.btn_num3.bEnabled = true;
     this.btn_num3.bOn = true;
     this.btn_num3.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num3.Location = new System.Drawing.Point(27, 215);
     this.btn_num3.Name = "btn_num3";
     this.btn_num3.Size = new System.Drawing.Size(86, 77);
     this.btn_num3.TabIndex = 11;
     //
     // btn_numN
     //
     this.btn_numN.BackColor = System.Drawing.Color.Blue;
     this.btn_numN.bEnabled = true;
     this.btn_numN.bOn = true;
     this.btn_numN.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_numN.Location = new System.Drawing.Point(145, 381);
     this.btn_numN.Name = "btn_numN";
     this.btn_numN.Size = new System.Drawing.Size(86, 77);
     this.btn_numN.TabIndex = 2;
     //
     // btn_num0
     //
     this.btn_num0.BackColor = System.Drawing.Color.Blue;
     this.btn_num0.bEnabled = true;
     this.btn_num0.bOn = true;
     this.btn_num0.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num0.Location = new System.Drawing.Point(27, 132);
     this.btn_num0.Name = "btn_num0";
     this.btn_num0.Size = new System.Drawing.Size(86, 77);
     this.btn_num0.TabIndex = 15;
     //
     // btn_num9
     //
     this.btn_num9.BackColor = System.Drawing.Color.Blue;
     this.btn_num9.bEnabled = true;
     this.btn_num9.bOn = true;
     this.btn_num9.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num9.Location = new System.Drawing.Point(27, 381);
     this.btn_num9.Name = "btn_num9";
     this.btn_num9.Size = new System.Drawing.Size(86, 77);
     this.btn_num9.TabIndex = 3;
     //
     // btn_num1
     //
     this.btn_num1.BackColor = System.Drawing.Color.Blue;
     this.btn_num1.bEnabled = true;
     this.btn_num1.bOn = true;
     this.btn_num1.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num1.Location = new System.Drawing.Point(145, 132);
     this.btn_num1.Name = "btn_num1";
     this.btn_num1.Size = new System.Drawing.Size(86, 77);
     this.btn_num1.TabIndex = 14;
     //
     // btn_backspace
     //
     this.btn_backspace.BackColor = System.Drawing.Color.Blue;
     this.btn_backspace.bEnabled = true;
     this.btn_backspace.bOn = true;
     this.btn_backspace.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
     this.btn_backspace.Location = new System.Drawing.Point(372, 298);
     this.btn_backspace.Name = "btn_backspace";
     this.btn_backspace.Size = new System.Drawing.Size(86, 77);
     this.btn_backspace.TabIndex = 4;
     //
     // btn_num2
     //
     this.btn_num2.BackColor = System.Drawing.Color.Blue;
     this.btn_num2.bEnabled = true;
     this.btn_num2.bOn = true;
     this.btn_num2.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num2.Location = new System.Drawing.Point(260, 132);
     this.btn_num2.Name = "btn_num2";
     this.btn_num2.Size = new System.Drawing.Size(86, 77);
     this.btn_num2.TabIndex = 13;
     //
     // btn_num8
     //
     this.btn_num8.BackColor = System.Drawing.Color.Blue;
     this.btn_num8.bEnabled = true;
     this.btn_num8.bOn = true;
     this.btn_num8.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num8.Location = new System.Drawing.Point(260, 298);
     this.btn_num8.Name = "btn_num8";
     this.btn_num8.Size = new System.Drawing.Size(86, 77);
     this.btn_num8.TabIndex = 5;
     //
     // btn_ok
     //
     this.btn_ok.BackColor = System.Drawing.Color.Blue;
     this.btn_ok.bEnabled = true;
     this.btn_ok.bOn = true;
     this.btn_ok.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
     this.btn_ok.Location = new System.Drawing.Point(372, 132);
     this.btn_ok.Name = "btn_ok";
     this.btn_ok.Size = new System.Drawing.Size(86, 77);
     this.btn_ok.TabIndex = 12;
     //
     // btn_num7
     //
     this.btn_num7.BackColor = System.Drawing.Color.Blue;
     this.btn_num7.bEnabled = true;
     this.btn_num7.bOn = true;
     this.btn_num7.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num7.Location = new System.Drawing.Point(145, 298);
     this.btn_num7.Name = "btn_num7";
     this.btn_num7.Size = new System.Drawing.Size(86, 77);
     this.btn_num7.TabIndex = 6;
     //
     // btn_num4
     //
     this.btn_num4.BackColor = System.Drawing.Color.Blue;
     this.btn_num4.bEnabled = true;
     this.btn_num4.bOn = true;
     this.btn_num4.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num4.Location = new System.Drawing.Point(145, 215);
     this.btn_num4.Name = "btn_num4";
     this.btn_num4.Size = new System.Drawing.Size(86, 77);
     this.btn_num4.TabIndex = 10;
     //
     // btn_num6
     //
     this.btn_num6.BackColor = System.Drawing.Color.Blue;
     this.btn_num6.bEnabled = true;
     this.btn_num6.bOn = true;
     this.btn_num6.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num6.Location = new System.Drawing.Point(27, 298);
     this.btn_num6.Name = "btn_num6";
     this.btn_num6.Size = new System.Drawing.Size(86, 77);
     this.btn_num6.TabIndex = 7;
     //
     // btn_num5
     //
     this.btn_num5.BackColor = System.Drawing.Color.Blue;
     this.btn_num5.bEnabled = true;
     this.btn_num5.bOn = true;
     this.btn_num5.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num5.Location = new System.Drawing.Point(260, 215);
     this.btn_num5.Name = "btn_num5";
     this.btn_num5.Size = new System.Drawing.Size(86, 77);
     this.btn_num5.TabIndex = 9;
     //
     // btn_clr
     //
     this.btn_clr.BackColor = System.Drawing.Color.Blue;
     this.btn_clr.bEnabled = true;
     this.btn_clr.bOn = true;
     this.btn_clr.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
     this.btn_clr.Location = new System.Drawing.Point(372, 215);
     this.btn_clr.Name = "btn_clr";
     this.btn_clr.Size = new System.Drawing.Size(86, 77);
     this.btn_clr.TabIndex = 8;
     //
     // roundRect1
     //
     this.roundRect1.BackColor = System.Drawing.Color.Blue;
     this.roundRect1.bEnabled = true;
     this.roundRect1.bOn = true;
     this.roundRect1.Location = new System.Drawing.Point(27, 57);
     this.roundRect1.Name = "roundRect1";
     this.roundRect1.Size = new System.Drawing.Size(431, 72);
     this.roundRect1.TabIndex = 18;
     //
     // btn_kscale
     //
     this.btn_kscale.BackColor = System.Drawing.Color.Blue;
     this.btn_kscale.bEnabled = true;
     this.btn_kscale.bOn = true;
     this.btn_kscale.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_kscale.Location = new System.Drawing.Point(360, 6);
     this.btn_kscale.Name = "btn_kscale";
     this.btn_kscale.Size = new System.Drawing.Size(57, 46);
     this.btn_kscale.TabIndex = 15;
     //
     // btn_mscale
     //
     this.btn_mscale.BackColor = System.Drawing.Color.Blue;
     this.btn_mscale.bEnabled = true;
     this.btn_mscale.bOn = true;
     this.btn_mscale.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_mscale.Location = new System.Drawing.Point(423, 6);
     this.btn_mscale.Name = "btn_mscale";
     this.btn_mscale.Size = new System.Drawing.Size(57, 46);
     this.btn_mscale.TabIndex = 15;
     //
     // btn_gscale
     //
     this.btn_gscale.BackColor = System.Drawing.Color.Blue;
     this.btn_gscale.bEnabled = true;
     this.btn_gscale.bOn = true;
     this.btn_gscale.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_gscale.Location = new System.Drawing.Point(260, 3);
     this.btn_gscale.Name = "btn_gscale";
     this.btn_gscale.Size = new System.Drawing.Size(50, 46);
     this.btn_gscale.TabIndex = 15;
     //
     // kbdWnd
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
     this.AutoScroll = true;
     this.BackColor = System.Drawing.Color.White;
     this.ClientSize = new System.Drawing.Size(495, 480);
     this.ControlBox = false;
     this.Controls.Add(this.datalabel);
     this.Controls.Add(this.roundRect1);
     this.Controls.Add(this.panel1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.Location = new System.Drawing.Point(212, 5);
     this.Name = "kbdWnd";
     this.Text = "kbdWnd";
     this.TopMost = true;
     this.panel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Пример #22
0
        public TeamInitWidget(WidgetRenderer wr, int w, int h, int buf, Color cBack, ButtonHighlightOptions bh1, ButtonHighlightOptions bh2, Color cText)
        {
            BackRect              = new RectWidget(wr);
            BackRect.Width        = w;
            BackRect.Height       = h;
            BackRect.Offset       = new Point(0, 0);
            BackRect.OffsetAlignY = Alignment.BOTTOM;
            BackRect.Color        = cBack;
            BackRect.LayerDepth   = 1f;

            int wh = h - buf * 2;

            TextIndex              = new TextWidget(wr);
            TextIndex.Offset       = new Point(buf, 0);
            TextIndex.OffsetAlignX = Alignment.LEFT;
            TextIndex.OffsetAlignY = Alignment.MID;
            TextIndex.AlignX       = Alignment.LEFT;
            TextIndex.AlignY       = Alignment.MID;
            TextIndex.Height       = wh;
            TextIndex.Color        = cText;
            TextIndex.Parent       = BackRect;
            TextIndex.LayerDepth   = 0.3f;

            TextUser              = new TextWidget(wr);
            TextUser.Offset       = new Point(buf, 0);
            TextUser.OffsetAlignX = Alignment.RIGHT;
            TextUser.OffsetAlignY = Alignment.MID;
            TextUser.AlignX       = Alignment.LEFT;
            TextUser.AlignY       = Alignment.MID;
            TextUser.Height       = wh;
            TextUser.Color        = cText;
            TextUser.Parent       = TextIndex;
            TextUser.LayerDepth   = 0.3f;

            ButtonScheme              = new RectButton(wr, bh1, bh2);
            ButtonScheme.Offset       = new Point(-buf, 0);
            ButtonScheme.OffsetAlignX = Alignment.RIGHT;
            ButtonScheme.OffsetAlignY = Alignment.MID;
            ButtonScheme.AlignX       = Alignment.RIGHT;
            ButtonScheme.AlignY       = Alignment.MID;
            ButtonScheme.Parent       = BackRect;
            ButtonScheme.LayerDepth   = 0.3f;
            TextScheme              = new TextWidget(wr);
            TextScheme.Height       = bh1.Height;
            TextScheme.Text         = "Default";
            TextScheme.Offset       = new Point(0, 0);
            TextScheme.OffsetAlignX = Alignment.MID;
            TextScheme.OffsetAlignY = Alignment.MID;
            TextScheme.AlignX       = Alignment.MID;
            TextScheme.AlignY       = Alignment.MID;
            TextScheme.Parent       = ButtonScheme;
            TextScheme.Color        = cText;
            TextScheme.LayerDepth   = 0f;

            ButtonRace              = new RectButton(wr, bh1, bh2);
            ButtonRace.Offset       = new Point(-buf, 0);
            ButtonRace.OffsetAlignX = Alignment.LEFT;
            ButtonRace.OffsetAlignY = Alignment.MID;
            ButtonRace.AlignX       = Alignment.RIGHT;
            ButtonRace.AlignY       = Alignment.MID;
            ButtonRace.Parent       = ButtonScheme;
            ButtonRace.LayerDepth   = 0.3f;
            TextRace              = new TextWidget(wr);
            TextRace.Height       = bh1.Height;
            TextRace.Text         = "Race";
            TextRace.Offset       = new Point(0, 0);
            TextRace.OffsetAlignX = Alignment.MID;
            TextRace.OffsetAlignY = Alignment.MID;
            TextRace.AlignX       = Alignment.MID;
            TextRace.AlignY       = Alignment.MID;
            TextRace.Parent       = ButtonRace;
            TextRace.Color        = cText;
            TextRace.LayerDepth   = 0f;

            ButtonPlayerType              = new RectButton(wr, bh1, bh2);
            ButtonPlayerType.Offset       = new Point(-buf, 0);
            ButtonPlayerType.OffsetAlignX = Alignment.LEFT;
            ButtonPlayerType.OffsetAlignY = Alignment.MID;
            ButtonPlayerType.AlignX       = Alignment.RIGHT;
            ButtonPlayerType.AlignY       = Alignment.MID;
            ButtonPlayerType.Parent       = ButtonRace;
            ButtonPlayerType.LayerDepth   = 0.3f;
            TextPlayerType              = new TextWidget(wr);
            TextPlayerType.Height       = bh1.Height;
            TextPlayerType.Text         = "None";
            TextPlayerType.Offset       = new Point(0, 0);
            TextPlayerType.OffsetAlignX = Alignment.MID;
            TextPlayerType.OffsetAlignY = Alignment.MID;
            TextPlayerType.AlignX       = Alignment.MID;
            TextPlayerType.AlignY       = Alignment.MID;
            TextPlayerType.Parent       = ButtonPlayerType;
            TextPlayerType.Color        = cText;
            TextPlayerType.LayerDepth   = 0f;

            ButtonScheme.Hook();
            ButtonRace.Hook();
            ButtonPlayerType.Hook();

            ButtonScheme.OnButtonPress     += ButtonScheme_OnButtonPress;
            ButtonRace.OnButtonPress       += ButtonRace_OnButtonPress;
            ButtonPlayerType.OnButtonPress += ButtonPlayerType_OnButtonPress;
        }
Пример #23
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.notelabel = new System.Windows.Forms.Label();
     this.datalabel = new System.Windows.Forms.Label();
     this.panel1 = new System.Windows.Forms.Panel();
     this.btn_quit = new Mndz.RectButton();
     this.btn_numP = new Mndz.RectButton();
     this.btn_numN = new Mndz.RectButton();
     this.btn_num9 = new Mndz.RectButton();
     this.btn_backspace = new Mndz.RectButton();
     this.btn_num8 = new Mndz.RectButton();
     this.btn_num7 = new Mndz.RectButton();
     this.btn_num6 = new Mndz.RectButton();
     this.btn_clr = new Mndz.RectButton();
     this.btn_num5 = new Mndz.RectButton();
     this.btn_num4 = new Mndz.RectButton();
     this.btn_num3 = new Mndz.RectButton();
     this.btn_ok = new Mndz.RectButton();
     this.btn_num2 = new Mndz.RectButton();
     this.btn_num1 = new Mndz.RectButton();
     this.btn_num0 = new Mndz.RectButton();
     this.roundRect1 = new Mndz.RectButton();
     this.SuspendLayout();
     //
     // notelabel
     //
     this.notelabel.Font = new System.Drawing.Font("Arial", 18F);
     this.notelabel.Location = new System.Drawing.Point(27, 29);
     this.notelabel.Name = "notelabel";
     this.notelabel.Size = new System.Drawing.Size(434, 54);
     this.notelabel.TabIndex = 23;
     this.notelabel.Text = "label1";
     //
     // datalabel
     //
     this.datalabel.BackColor = System.Drawing.Color.Moccasin;
     this.datalabel.Font = new System.Drawing.Font("Arial", 36F);
     this.datalabel.ForeColor = System.Drawing.Color.Red;
     this.datalabel.Location = new System.Drawing.Point(34, 95);
     this.datalabel.Name = "datalabel";
     this.datalabel.Size = new System.Drawing.Size(420, 54);
     this.datalabel.TabIndex = 22;
     this.datalabel.Text = "label1";
     this.datalabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     //
     // panel1
     //
     this.panel1.BackColor = System.Drawing.Color.Transparent;
     this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.panel1.Location = new System.Drawing.Point(0, 2);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(494, 588);
     this.panel1.TabIndex = 24;
     //
     // btn_quit
     //
     this.btn_quit.BackColor = System.Drawing.Color.Blue;
     this.btn_quit.bEnabled = true;
     this.btn_quit.bOn = true;
     this.btn_quit.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_quit.Location = new System.Drawing.Point(375, 479);
     this.btn_quit.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
     this.btn_quit.Name = "btn_quit";
     this.btn_quit.Size = new System.Drawing.Size(86, 77);
     this.btn_quit.TabIndex = 21;
     //
     // btn_numP
     //
     this.btn_numP.BackColor = System.Drawing.Color.Blue;
     this.btn_numP.bEnabled = true;
     this.btn_numP.bOn = true;
     this.btn_numP.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_numP.Location = new System.Drawing.Point(263, 479);
     this.btn_numP.Margin = new System.Windows.Forms.Padding(9, 8, 9, 8);
     this.btn_numP.Name = "btn_numP";
     this.btn_numP.Size = new System.Drawing.Size(86, 77);
     this.btn_numP.TabIndex = 20;
     //
     // btn_numN
     //
     this.btn_numN.BackColor = System.Drawing.Color.Blue;
     this.btn_numN.bEnabled = true;
     this.btn_numN.bOn = true;
     this.btn_numN.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_numN.Location = new System.Drawing.Point(148, 479);
     this.btn_numN.Margin = new System.Windows.Forms.Padding(9, 8, 9, 8);
     this.btn_numN.Name = "btn_numN";
     this.btn_numN.Size = new System.Drawing.Size(86, 77);
     this.btn_numN.TabIndex = 19;
     //
     // btn_num9
     //
     this.btn_num9.BackColor = System.Drawing.Color.Blue;
     this.btn_num9.bEnabled = true;
     this.btn_num9.bOn = true;
     this.btn_num9.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_num9.Location = new System.Drawing.Point(30, 479);
     this.btn_num9.Margin = new System.Windows.Forms.Padding(9, 8, 9, 8);
     this.btn_num9.Name = "btn_num9";
     this.btn_num9.Size = new System.Drawing.Size(86, 77);
     this.btn_num9.TabIndex = 18;
     //
     // btn_backspace
     //
     this.btn_backspace.BackColor = System.Drawing.Color.Blue;
     this.btn_backspace.bEnabled = true;
     this.btn_backspace.bOn = true;
     this.btn_backspace.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_backspace.Location = new System.Drawing.Point(375, 380);
     this.btn_backspace.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
     this.btn_backspace.Name = "btn_backspace";
     this.btn_backspace.Size = new System.Drawing.Size(86, 77);
     this.btn_backspace.TabIndex = 17;
     //
     // btn_num8
     //
     this.btn_num8.BackColor = System.Drawing.Color.Blue;
     this.btn_num8.bEnabled = true;
     this.btn_num8.bOn = true;
     this.btn_num8.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_num8.Location = new System.Drawing.Point(263, 380);
     this.btn_num8.Margin = new System.Windows.Forms.Padding(9, 8, 9, 8);
     this.btn_num8.Name = "btn_num8";
     this.btn_num8.Size = new System.Drawing.Size(86, 77);
     this.btn_num8.TabIndex = 16;
     //
     // btn_num7
     //
     this.btn_num7.BackColor = System.Drawing.Color.Blue;
     this.btn_num7.bEnabled = true;
     this.btn_num7.bOn = true;
     this.btn_num7.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_num7.Location = new System.Drawing.Point(148, 380);
     this.btn_num7.Margin = new System.Windows.Forms.Padding(9, 8, 9, 8);
     this.btn_num7.Name = "btn_num7";
     this.btn_num7.Size = new System.Drawing.Size(86, 77);
     this.btn_num7.TabIndex = 15;
     //
     // btn_num6
     //
     this.btn_num6.BackColor = System.Drawing.Color.Blue;
     this.btn_num6.bEnabled = true;
     this.btn_num6.bOn = true;
     this.btn_num6.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_num6.Location = new System.Drawing.Point(30, 380);
     this.btn_num6.Margin = new System.Windows.Forms.Padding(9, 8, 9, 8);
     this.btn_num6.Name = "btn_num6";
     this.btn_num6.Size = new System.Drawing.Size(86, 77);
     this.btn_num6.TabIndex = 14;
     //
     // btn_clr
     //
     this.btn_clr.BackColor = System.Drawing.Color.Blue;
     this.btn_clr.bEnabled = true;
     this.btn_clr.bOn = true;
     this.btn_clr.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_clr.Location = new System.Drawing.Point(375, 284);
     this.btn_clr.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
     this.btn_clr.Name = "btn_clr";
     this.btn_clr.Size = new System.Drawing.Size(86, 77);
     this.btn_clr.TabIndex = 11;
     //
     // btn_num5
     //
     this.btn_num5.BackColor = System.Drawing.Color.Blue;
     this.btn_num5.bEnabled = true;
     this.btn_num5.bOn = true;
     this.btn_num5.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_num5.Location = new System.Drawing.Point(263, 284);
     this.btn_num5.Margin = new System.Windows.Forms.Padding(9, 8, 9, 8);
     this.btn_num5.Name = "btn_num5";
     this.btn_num5.Size = new System.Drawing.Size(86, 77);
     this.btn_num5.TabIndex = 10;
     //
     // btn_num4
     //
     this.btn_num4.BackColor = System.Drawing.Color.Blue;
     this.btn_num4.bEnabled = true;
     this.btn_num4.bOn = true;
     this.btn_num4.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_num4.Location = new System.Drawing.Point(148, 284);
     this.btn_num4.Margin = new System.Windows.Forms.Padding(9, 8, 9, 8);
     this.btn_num4.Name = "btn_num4";
     this.btn_num4.Size = new System.Drawing.Size(86, 77);
     this.btn_num4.TabIndex = 9;
     //
     // btn_num3
     //
     this.btn_num3.BackColor = System.Drawing.Color.Blue;
     this.btn_num3.bEnabled = true;
     this.btn_num3.bOn = true;
     this.btn_num3.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_num3.Location = new System.Drawing.Point(30, 284);
     this.btn_num3.Margin = new System.Windows.Forms.Padding(9, 8, 9, 8);
     this.btn_num3.Name = "btn_num3";
     this.btn_num3.Size = new System.Drawing.Size(86, 77);
     this.btn_num3.TabIndex = 8;
     //
     // btn_ok
     //
     this.btn_ok.BackColor = System.Drawing.Color.Blue;
     this.btn_ok.bEnabled = true;
     this.btn_ok.bOn = true;
     this.btn_ok.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_ok.Location = new System.Drawing.Point(375, 188);
     this.btn_ok.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
     this.btn_ok.Name = "btn_ok";
     this.btn_ok.Size = new System.Drawing.Size(86, 77);
     this.btn_ok.TabIndex = 7;
     //
     // btn_num2
     //
     this.btn_num2.BackColor = System.Drawing.Color.Blue;
     this.btn_num2.bEnabled = true;
     this.btn_num2.bOn = true;
     this.btn_num2.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_num2.Location = new System.Drawing.Point(263, 188);
     this.btn_num2.Margin = new System.Windows.Forms.Padding(9, 8, 9, 8);
     this.btn_num2.Name = "btn_num2";
     this.btn_num2.Size = new System.Drawing.Size(86, 77);
     this.btn_num2.TabIndex = 6;
     //
     // btn_num1
     //
     this.btn_num1.BackColor = System.Drawing.Color.Blue;
     this.btn_num1.bEnabled = true;
     this.btn_num1.bOn = true;
     this.btn_num1.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_num1.Location = new System.Drawing.Point(148, 188);
     this.btn_num1.Margin = new System.Windows.Forms.Padding(9, 8, 9, 8);
     this.btn_num1.Name = "btn_num1";
     this.btn_num1.Size = new System.Drawing.Size(86, 77);
     this.btn_num1.TabIndex = 5;
     //
     // btn_num0
     //
     this.btn_num0.BackColor = System.Drawing.Color.Blue;
     this.btn_num0.bEnabled = true;
     this.btn_num0.bOn = true;
     this.btn_num0.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_num0.Location = new System.Drawing.Point(30, 188);
     this.btn_num0.Margin = new System.Windows.Forms.Padding(9, 8, 9, 8);
     this.btn_num0.Name = "btn_num0";
     this.btn_num0.Size = new System.Drawing.Size(86, 77);
     this.btn_num0.TabIndex = 4;
     //
     // roundRect1
     //
     this.roundRect1.BackColor = System.Drawing.Color.Blue;
     this.roundRect1.bEnabled = true;
     this.roundRect1.bOn = true;
     this.roundRect1.Location = new System.Drawing.Point(27, 86);
     this.roundRect1.Name = "roundRect1";
     this.roundRect1.Size = new System.Drawing.Size(434, 72);
     this.roundRect1.TabIndex = 0;
     //
     // kbdWnd
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
     this.AutoScroll = true;
     this.BackColor = System.Drawing.Color.White;
     this.ClientSize = new System.Drawing.Size(495, 602);
     this.ControlBox = false;
     this.Controls.Add(this.btn_quit);
     this.Controls.Add(this.btn_numP);
     this.Controls.Add(this.btn_numN);
     this.Controls.Add(this.btn_num9);
     this.Controls.Add(this.btn_backspace);
     this.Controls.Add(this.btn_num8);
     this.Controls.Add(this.btn_num7);
     this.Controls.Add(this.btn_num6);
     this.Controls.Add(this.btn_clr);
     this.Controls.Add(this.btn_num5);
     this.Controls.Add(this.btn_num4);
     this.Controls.Add(this.btn_num3);
     this.Controls.Add(this.btn_ok);
     this.Controls.Add(this.btn_num2);
     this.Controls.Add(this.btn_num1);
     this.Controls.Add(this.btn_num0);
     this.Controls.Add(this.datalabel);
     this.Controls.Add(this.notelabel);
     this.Controls.Add(this.roundRect1);
     this.Controls.Add(this.panel1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Location = new System.Drawing.Point(212, 83);
     this.Name = "kbdWnd";
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text = "kbdWnd";
     this.ResumeLayout(false);
 }
Пример #24
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.notelabel = new System.Windows.Forms.Label();
     this.datalabel = new System.Windows.Forms.Label();
     this.panel1 = new System.Windows.Forms.Panel();
     this.btn_quit = new Mndz.RectButton();
     this.btn_numP = new Mndz.RectButton();
     this.btn_numN = new Mndz.RectButton();
     this.btn_num9 = new Mndz.RectButton();
     this.btn_backspace = new Mndz.RectButton();
     this.btn_num8 = new Mndz.RectButton();
     this.btn_num7 = new Mndz.RectButton();
     this.btn_num6 = new Mndz.RectButton();
     this.btn_clr = new Mndz.RectButton();
     this.btn_num5 = new Mndz.RectButton();
     this.btn_num4 = new Mndz.RectButton();
     this.btn_num3 = new Mndz.RectButton();
     this.btn_ok = new Mndz.RectButton();
     this.btn_num2 = new Mndz.RectButton();
     this.btn_num1 = new Mndz.RectButton();
     this.btn_num0 = new Mndz.RectButton();
     this.roundRect1 = new Mndz.RectButton();
     this.SuspendLayout();
     //
     // notelabel
     //
     this.notelabel.Font = new System.Drawing.Font("Arial", 18F, System.Drawing.FontStyle.Regular);
     this.notelabel.Location = new System.Drawing.Point(27, 29);
     this.notelabel.Name = "notelabel";
     this.notelabel.Size = new System.Drawing.Size(434, 54);
     this.notelabel.Text = "label1";
     //
     // datalabel
     //
     this.datalabel.BackColor = System.Drawing.Color.Moccasin;
     this.datalabel.Font = new System.Drawing.Font("Arial", 36F, System.Drawing.FontStyle.Regular);
     this.datalabel.ForeColor = System.Drawing.Color.Red;
     this.datalabel.Location = new System.Drawing.Point(34, 95);
     this.datalabel.Name = "datalabel";
     this.datalabel.Size = new System.Drawing.Size(420, 54);
     this.datalabel.Text = "label1";
     this.datalabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
     //
     // panel1
     //
     this.panel1.BackColor = System.Drawing.Color.Transparent;
     this.panel1.Location = new System.Drawing.Point(0, 2);
     this.panel1.Name = "panel1";
     this.panel1.Size = new System.Drawing.Size(494, 588);
     //
     // btn_quit
     //
     this.btn_quit.BackColor = System.Drawing.Color.Transparent;
     this.btn_quit.bOn = true;
     this.btn_quit.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
     this.btn_quit.Location = new System.Drawing.Point(375, 479);
     this.btn_quit.Name = "btn_quit";
     this.btn_quit.Size = new System.Drawing.Size(86, 77);
     //
     // btn_numP
     //
     this.btn_numP.BackColor = System.Drawing.Color.Transparent;
     this.btn_numP.bOn = true;
     this.btn_numP.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_numP.Location = new System.Drawing.Point(263, 479);
     this.btn_numP.Name = "btn_numP";
     this.btn_numP.Size = new System.Drawing.Size(86, 77);
     //
     // btn_numN
     //
     this.btn_numN.BackColor = System.Drawing.Color.Transparent;
     this.btn_numN.bOn = true;
     this.btn_numN.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_numN.Location = new System.Drawing.Point(148, 479);
     this.btn_numN.Name = "btn_numN";
     this.btn_numN.Size = new System.Drawing.Size(86, 77);
     //
     // btn_num9
     //
     this.btn_num9.BackColor = System.Drawing.Color.Transparent;
     this.btn_num9.bOn = true;
     this.btn_num9.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num9.Location = new System.Drawing.Point(30, 479);
     this.btn_num9.Name = "btn_num9";
     this.btn_num9.Size = new System.Drawing.Size(86, 77);
     //
     // btn_backspace
     //
     this.btn_backspace.BackColor = System.Drawing.Color.Transparent;
     this.btn_backspace.bOn = true;
     this.btn_backspace.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
     this.btn_backspace.Location = new System.Drawing.Point(375, 380);
     this.btn_backspace.Name = "btn_backspace";
     this.btn_backspace.Size = new System.Drawing.Size(86, 77);
     //
     // btn_num8
     //
     this.btn_num8.BackColor = System.Drawing.Color.Transparent;
     this.btn_num8.bOn = true;
     this.btn_num8.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num8.Location = new System.Drawing.Point(263, 380);
     this.btn_num8.Name = "btn_num8";
     this.btn_num8.Size = new System.Drawing.Size(86, 77);
     //
     // btn_num7
     //
     this.btn_num7.BackColor = System.Drawing.Color.Transparent;
     this.btn_num7.bOn = true;
     this.btn_num7.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num7.Location = new System.Drawing.Point(148, 380);
     this.btn_num7.Name = "btn_num7";
     this.btn_num7.Size = new System.Drawing.Size(86, 77);
     //
     // btn_num6
     //
     this.btn_num6.BackColor = System.Drawing.Color.Transparent;
     this.btn_num6.bOn = true;
     this.btn_num6.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num6.Location = new System.Drawing.Point(30, 380);
     this.btn_num6.Name = "btn_num6";
     this.btn_num6.Size = new System.Drawing.Size(86, 77);
     //
     // btn_clr
     //
     this.btn_clr.BackColor = System.Drawing.Color.Transparent;
     this.btn_clr.bOn = true;
     this.btn_clr.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
     this.btn_clr.Location = new System.Drawing.Point(375, 284);
     this.btn_clr.Name = "btn_clr";
     this.btn_clr.Size = new System.Drawing.Size(86, 77);
     //
     // btn_num5
     //
     this.btn_num5.BackColor = System.Drawing.Color.Transparent;
     this.btn_num5.bOn = true;
     this.btn_num5.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num5.Location = new System.Drawing.Point(263, 284);
     this.btn_num5.Name = "btn_num5";
     this.btn_num5.Size = new System.Drawing.Size(86, 77);
     //
     // btn_num4
     //
     this.btn_num4.BackColor = System.Drawing.Color.Transparent;
     this.btn_num4.bOn = true;
     this.btn_num4.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num4.Location = new System.Drawing.Point(148, 284);
     this.btn_num4.Name = "btn_num4";
     this.btn_num4.Size = new System.Drawing.Size(86, 77);
     //
     // btn_num3
     //
     this.btn_num3.BackColor = System.Drawing.Color.Transparent;
     this.btn_num3.bOn = true;
     this.btn_num3.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num3.Location = new System.Drawing.Point(30, 284);
     this.btn_num3.Name = "btn_num3";
     this.btn_num3.Size = new System.Drawing.Size(86, 77);
     //
     // btn_ok
     //
     this.btn_ok.BackColor = System.Drawing.Color.Transparent;
     this.btn_ok.bOn = true;
     this.btn_ok.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
     this.btn_ok.Location = new System.Drawing.Point(375, 188);
     this.btn_ok.Name = "btn_ok";
     this.btn_ok.Size = new System.Drawing.Size(86, 77);
     //
     // btn_num2
     //
     this.btn_num2.BackColor = System.Drawing.Color.Transparent;
     this.btn_num2.bOn = true;
     this.btn_num2.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num2.Location = new System.Drawing.Point(263, 188);
     this.btn_num2.Name = "btn_num2";
     this.btn_num2.Size = new System.Drawing.Size(86, 77);
     //
     // btn_num1
     //
     this.btn_num1.BackColor = System.Drawing.Color.Transparent;
     this.btn_num1.bOn = true;
     this.btn_num1.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num1.Location = new System.Drawing.Point(148, 188);
     this.btn_num1.Name = "btn_num1";
     this.btn_num1.Size = new System.Drawing.Size(86, 77);
     //
     // btn_num0
     //
     this.btn_num0.BackColor = System.Drawing.Color.Transparent;
     this.btn_num0.bOn = true;
     this.btn_num0.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F, System.Drawing.FontStyle.Bold);
     this.btn_num0.Location = new System.Drawing.Point(30, 188);
     this.btn_num0.Name = "btn_num0";
     this.btn_num0.Size = new System.Drawing.Size(86, 77);
     //
     // roundRect1
     //
     this.roundRect1.BackColor = System.Drawing.Color.Transparent;
     this.roundRect1.bOn = true;
     this.roundRect1.Location = new System.Drawing.Point(27, 86);
     this.roundRect1.Name = "roundRect1";
     this.roundRect1.Size = new System.Drawing.Size(434, 72);
     //
     // kbdWnd
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
     this.AutoScroll = true;
     this.BackColor = System.Drawing.Color.White;
     this.ClientSize = new System.Drawing.Size(495, 600);
     this.ControlBox = false;
     this.Controls.Add(this.btn_quit);
     this.Controls.Add(this.btn_numP);
     this.Controls.Add(this.btn_numN);
     this.Controls.Add(this.btn_num9);
     this.Controls.Add(this.btn_backspace);
     this.Controls.Add(this.btn_num8);
     this.Controls.Add(this.btn_num7);
     this.Controls.Add(this.btn_num6);
     this.Controls.Add(this.btn_clr);
     this.Controls.Add(this.btn_num5);
     this.Controls.Add(this.btn_num4);
     this.Controls.Add(this.btn_num3);
     this.Controls.Add(this.btn_ok);
     this.Controls.Add(this.btn_num2);
     this.Controls.Add(this.btn_num1);
     this.Controls.Add(this.btn_num0);
     this.Controls.Add(this.datalabel);
     this.Controls.Add(this.notelabel);
     this.Controls.Add(this.roundRect1);
     this.Controls.Add(this.panel1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.Location = new System.Drawing.Point(212, 5);
     this.Name = "kbdWnd";
     this.Text = "kbdWnd";
     this.TopMost = true;
     this.panel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Пример #25
0
 void ButtonScheme_OnButtonPress(RectButton obj, Vector2 m)
 {
     si     = (si + 1) % lSchemes.Length;
     Scheme = lSchemes[si];
 }
Пример #26
0
        public LEMenu(WidgetRenderer wr, UICLEMenu _uic)
        {
            uic              = _uic;
            WidgetBase       = new RectWidget(wr);
            WidgetBase.Color = UserConfig.MainScheme.WidgetBase;
            WidgetBase.Width = uic.TextInputBufferSize.X + uic.WidgetSpacing * 2;

            btns = new RectButton[5];
            for (int i = 0; i < btns.Length; i++)
            {
                btns[i] = new RectButton(wr,
                                         i == 0 ? uic.TextInputBufferSize.X : (uic.TextInputBufferSize.X - uic.WidgetSpacing) / 2,
                                         uic.TextInputBufferSize.Y,
                                         UserConfig.MainScheme.WidgetInactive,
                                         UserConfig.MainScheme.WidgetActive
                                         );
            }
            txts = new TextWidget[3];
            for (int i = 0; i < txts.Length; i++)
            {
                txts[i]              = new TextWidget(wr);
                txts[i].Height       = uic.TextHeight;
                txts[i].Color        = UserConfig.MainScheme.Text;
                txts[i].OffsetAlignX = Alignment.MID;
                txts[i].AlignX       = Alignment.MID;
                if (i != 0)
                {
                    txts[i].OffsetAlignY = Alignment.MID;
                    txts[i].AlignY       = Alignment.MID;
                }
            }
            txts[0].Text = "Map Name";
            txts[1].Text = "Save";
            txts[2].Text = "Load";

            tInputs = new TextInputWidget[3];
            for (int i = 0; i < tInputs.Length; i++)
            {
                tInputs[i]              = new TextInputWidget(wr);
                tInputs[i].Height       = uic.TextHeight;
                tInputs[i].Color        = UserConfig.MainScheme.Text;
                tInputs[i].Caret.Width  = 1;
                tInputs[i].Caret.Color  = uic.CaretColor;
                tInputs[i].OffsetAlignX = Alignment.MID;
                tInputs[i].OffsetAlignY = Alignment.MID;
                tInputs[i].AlignX       = Alignment.MID;
                tInputs[i].AlignY       = Alignment.MID;
            }
            MapLocation = uic.DefaultMapLocText;
            MapWidth    = uic.DefaultWidth;
            MapHeight   = uic.DefaultHeight;


            txts[0].Parent = WidgetBase;
            txts[0].Offset = new Point(0, uic.WidgetSpacing);

            btns[0].OffsetAlignX = Alignment.MID;
            btns[0].OffsetAlignY = Alignment.BOTTOM;
            btns[0].Offset       = new Point(0, uic.WidgetSpacing);
            btns[0].AlignX       = Alignment.MID;
            btns[0].Parent       = txts[0];
            btns[1].OffsetAlignX = Alignment.LEFT;
            btns[1].OffsetAlignY = Alignment.BOTTOM;
            btns[1].Offset       = new Point(0, uic.WidgetSpacing);
            btns[1].AlignX       = Alignment.LEFT;
            btns[1].Parent       = btns[0];
            btns[2].OffsetAlignX = Alignment.RIGHT;
            btns[2].OffsetAlignY = Alignment.BOTTOM;
            btns[2].Offset       = new Point(0, uic.WidgetSpacing);
            btns[2].AlignX       = Alignment.RIGHT;
            btns[2].Parent       = btns[0];
            for (int i = 0; i < 3; i++)
            {
                tInputs[i].Parent = btns[i];
            }
            for (int i = 0; i < 2; i++)
            {
                btns[i + 3].OffsetAlignY = Alignment.BOTTOM;
                btns[i + 3].Offset       = new Point(0, uic.WidgetSpacing);
                btns[i + 3].Parent       = btns[i + 1];
                txts[i + 1].Parent       = btns[i + 3];
            }
            WidgetBase.Height = btns[4].Y + btns[4].Height + uic.WidgetSpacing;

            for (int i = 0; i < 3; i++)
            {
                btns[i].OnButtonPress += GetInputActivator(i);
            }
        }
Пример #27
0
 void TargetButton_OnMouseEntry(RectButton arg1, Vector2 arg2)
 {
     shouldShow = true;
 }
Пример #28
0
 private void TargetButton_OnMouseExit(RectButton arg1, Vector2 arg2)
 {
     shouldShow         = false;
     PanelWidget.Anchor = new Point(-1000000, -1000000);
 }
Пример #29
0
 private void OnBPExit(RectButton button, Vector2 p)
 {
     State = ScreenState.ExitApplication;
 }
Пример #30
0
        public RTSBuildingDataPanel(RTSRenderer renderer, WidgetRenderer wr, UICBuildingData _uic)
        {
            uic     = _uic;
            iconLib = renderer.IconLibrary;

            WidgetBase        = new RectWidget(wr, renderer.LoadTexture2D(uic.PanelImage));
            WidgetBase.Width  = uic.PanelSize.X;
            WidgetBase.Height = uic.PanelSize.Y;
            WidgetBase.Color  = uic.PanelColor;

            icon        = new RectWidget(wr);
            icon.Width  = uic.IconSize;
            icon.Height = uic.IconSize;
            icon.Color  = Color.White;
            icon.Offset = new Point(uic.IconBuffer, uic.IconBuffer);
            icon.Parent = WidgetBase;

            rectHealthBack              = new RectWidget(wr);
            rectHealthBack.Width        = uic.IconSize;
            rectHealthBack.Height       = uic.HealthHeight;
            rectHealthBack.AlignX       = Alignment.MID;
            rectHealthBack.OffsetAlignX = Alignment.MID;
            rectHealthBack.OffsetAlignY = Alignment.BOTTOM;
            rectHealthBack.Offset       = new Point(0, uic.IconBuffer);
            rectHealthBack.Color        = UserConfig.MainScheme.WidgetBorder;
            rectHealthBack.Parent       = icon;

            rectHealthFore              = new RectWidget(wr);
            rectHealthFore.Width        = uic.IconSize;
            rectHealthFore.Height       = rectHealthBack.Height;
            rectHealthFore.AlignX       = Alignment.MID;
            rectHealthFore.AlignY       = Alignment.MID;
            rectHealthFore.OffsetAlignX = Alignment.MID;
            rectHealthFore.OffsetAlignY = Alignment.MID;
            rectHealthFore.Offset       = new Point(0, 0);
            rectHealthFore.Color        = uic.HealthMaxColor;
            rectHealthFore.Parent       = rectHealthBack;

            queueButtons                 = new RectButton[6];
            queueButtons[0]              = new RectButton(wr, uic.QueueIconMainSize, uic.QueueIconMainSize, Color.White, uic.QueueButtonHighlightColor);
            queueButtons[0].AlignY       = Alignment.BOTTOM;
            queueButtons[0].OffsetAlignY = Alignment.BOTTOM;
            queueButtons[0].OffsetAlignX = Alignment.RIGHT;
            queueButtons[0].Offset       = new Point(uic.IconBuffer, 0);
            queueButtons[0].Parent       = rectHealthBack;
            for (int i = 1; i < 6; i++)
            {
                queueButtons[i]              = new RectButton(wr, uic.QueueIconQueuedSize, uic.QueueIconQueuedSize, Color.White, uic.QueueButtonHighlightColor);
                queueButtons[i].AlignY       = Alignment.BOTTOM;
                queueButtons[i].OffsetAlignY = Alignment.BOTTOM;
                queueButtons[i].OffsetAlignX = Alignment.RIGHT;
                queueButtons[i].Parent       = queueButtons[i - 1];
            }

            rectQueueBack              = new RectWidget(wr);
            rectQueueBack.Width        = uic.QueueIconQueuedSize * 5;
            rectQueueBack.Height       = uic.QueueIconMainSize - uic.QueueIconQueuedSize;
            rectQueueBack.OffsetAlignX = Alignment.RIGHT;
            rectQueueBack.Color        = UserConfig.MainScheme.WidgetBorder;
            rectQueueBack.Parent       = queueButtons[0];

            rectQueueFore              = new RectWidget(wr);
            rectQueueFore.Width        = uic.IconSize;
            rectQueueFore.Height       = rectQueueBack.Height;
            rectQueueFore.AlignY       = Alignment.MID;
            rectQueueFore.OffsetAlignY = Alignment.MID;
            rectQueueFore.Offset       = new Point(0, 0);
            rectQueueFore.Color        = uic.QueueMaxColor;
            rectQueueFore.Parent       = rectQueueBack;

            txtName              = new TextWidget(wr);
            txtName.Height       = uic.TextHeight;
            txtName.OffsetAlignX = Alignment.RIGHT;
            txtName.Offset       = new Point(uic.IconBuffer, 0);
            txtName.Color        = UserConfig.MainScheme.Text;
            txtName.Parent       = icon;
        }
Пример #31
0
 void ButtonRace_OnButtonPress(RectButton obj, Vector2 m)
 {
     ri   = (ri + 1) % lRaces.Length;
     Race = lRaces[ri];
 }
Пример #32
0
 public RTSUIGroup(WidgetRenderer wr, int s)
 {
     Widget = new RectButton(wr, s, s, COLOR_INACTIVE, COLOR_ACTIVE);
 }
Пример #33
0
 void ButtonPlayerType_OnButtonPress(RectButton obj, Vector2 m)
 {
     ti         = (ti + 1) % lTypes.Length;
     PlayerType = lTypes[ti];
 }
Пример #34
0
		private void setLayout()
		{
		//	setPosition(button, 0, 0, WIDTH, HEIGHT);
			button.Padding = new Thickness(0, 0, 0, 0);
			setPosition(canvas, 0, 0, WIDTH, HEIGHT);
			button.HorizontalAlignment = HorizontalAlignment.Left;

			mName = new Label();
			setPosition(mName, NAME_X, NAME_Y, NAME_W, NAME_H);
			mName.FontSize = 14;
			mName.Foreground = MetrialColor.getBrush(MetrialColor.Name.Grey, 8);
			mName.Content = mItem.getName();
			mName.VerticalContentAlignment = VerticalAlignment.Center;
			mName.HorizontalContentAlignment = HorizontalAlignment.Left;
			canvas.Children.Add(mName);

			mCategory = new Label();
			setPosition(mCategory, CATEGORY_X, CATEGORY_Y, CATEGORY_W, CATEGORY_H);
			mCategory.FontSize = 14;
			mCategory.Foreground = MetrialColor.getBrush(MetrialColor.Name.Grey, 8);

			List<wsr_pos.Category> category_list = DBManager.getInstance().getCategoryList();

			foreach(wsr_pos.Category category in category_list)
			{
				if(category.getId() == mItem.getCategoryId())
				{
					mCategory.Content = category.getName();
				}
			}

			mCategory.HorizontalContentAlignment = HorizontalAlignment.Center;
			mCategory.VerticalContentAlignment = VerticalAlignment.Center;
			canvas.Children.Add(mCategory);

			mComment = new Label();
			setPosition(mComment, COMMENT_X, COMMENT_Y, COMMENT_W, COMMENT_H);
			mComment.FontSize = 14;
			mComment.Foreground = MetrialColor.getBrush(MetrialColor.Name.Grey, 8);
			mComment.Content = mItem.getComment();
			mComment.HorizontalContentAlignment = HorizontalAlignment.Center;
			mComment.VerticalContentAlignment = VerticalAlignment.Center;
			canvas.Children.Add(mComment);

			mPrice = new Label();
			setPosition(mPrice, PRICE_X, PRICE_Y, PRICE_W, PRICE_H);
			mPrice.FontSize = 16;
			mPrice.Foreground = MetrialColor.getBrush(MetrialColor.Name.Grey, 8);
			mPrice.Content = string.Format("{0:N0}", mItem.getPrice());
			mPrice.VerticalContentAlignment = VerticalAlignment.Center;
			mPrice.HorizontalContentAlignment = HorizontalAlignment.Right;
			canvas.Children.Add(mPrice);

			mDiscount = new Label();
			setPosition(mDiscount, DISCOUNT_X, DISCOUNT_Y, DISCOUNT_W, DISCOUNT_H);
			mDiscount.FontSize = 16;
			mDiscount.Foreground = MetrialColor.getBrush(MetrialColor.Name.Grey, 8);
			mDiscount.Content = (mItem.getDiscount() ? "O" : "X");
			mDiscount.HorizontalContentAlignment = HorizontalAlignment.Center;
			mDiscount.VerticalContentAlignment = VerticalAlignment.Center;
			canvas.Children.Add(mDiscount);

			mPrintTogether = new Label();
			setPosition(mPrintTogether, PRINT_TOGETHER_X, PRINT_TOGETHER_Y, PRINT_TOGETHER_W, PRINT_TOGETHER_H);
			mPrintTogether.FontSize = 16;
			mPrintTogether.Foreground = MetrialColor.getBrush(MetrialColor.Name.Grey, 8);
			mPrintTogether.Content = (mItem.getPrintTogether() ? "O" : "X");
			mPrintTogether.HorizontalContentAlignment = HorizontalAlignment.Center;
			mPrintTogether.VerticalContentAlignment = VerticalAlignment.Center;
			canvas.Children.Add(mPrintTogether);

			mPrintDot = new Label();
			setPosition(mPrintDot, PRINT_DOT_X, PRINT_DOT_Y, PRINT_DOT_W, PRINT_DOT_H);
			mPrintDot.FontSize = 16;
			mPrintDot.Foreground = MetrialColor.getBrush(MetrialColor.Name.Grey, 8);
			mPrintDot.Content = (mItem.getPrintDot() ? "O" : "X");
			mPrintDot.HorizontalContentAlignment = HorizontalAlignment.Center;
			mPrintDot.VerticalContentAlignment = VerticalAlignment.Center;
			canvas.Children.Add(mPrintDot);

			mDelete = new RectButton(DELETE_W, DELETE_H);
			setPosition(mDelete, DELETE_X, DELETE_Y, DELETE_W, DELETE_H);
			mDelete.setBackgroundImage("delete.png", "delete.png");
			canvas.Children.Add(mDelete);

			mLine = new Canvas();
			setPosition(mLine, LINE_X, LINE_Y, LINE_W, LINE_H);
			mLine.Background = MetrialColor.getBrush(MetrialColor.Name.Grey, 4);
			canvas.Children.Add(mLine);
		}
Пример #35
0
 /// <summary> 
 /// Required method for Designer support - do not modify 
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.notelabel = new System.Windows.Forms.Label();
     this.btn_choice12 = new Mndz7.RectButton();
     this.btn_choice11 = new Mndz7.RectButton();
     this.btn_choice10 = new Mndz7.RectButton();
     this.btn_choice9 = new Mndz7.RectButton();
     this.btn_quit = new Mndz7.RectButton();
     this.btn_choice8 = new Mndz7.RectButton();
     this.btn_choice7 = new Mndz7.RectButton();
     this.btn_choice6 = new Mndz7.RectButton();
     this.btn_choice5 = new Mndz7.RectButton();
     this.btn_choice4 = new Mndz7.RectButton();
     this.btn_choice3 = new Mndz7.RectButton();
     this.btn_choice2 = new Mndz7.RectButton();
     this.btn_choice1 = new Mndz7.RectButton();
     this.SuspendLayout();
     //
     // notelabel
     //
     this.notelabel.Font = new System.Drawing.Font("Arial", 18F);
     this.notelabel.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
     this.notelabel.Location = new System.Drawing.Point(3, 17);
     this.notelabel.Name = "notelabel";
     this.notelabel.Size = new System.Drawing.Size(366, 54);
     this.notelabel.TabIndex = 24;
     this.notelabel.Text = "Please select item";
     //
     // btn_choice12
     //
     this.btn_choice12.BackColor = System.Drawing.Color.Blue;
     this.btn_choice12.bEnabled = true;
     this.btn_choice12.bOn = true;
     this.btn_choice12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_choice12.Location = new System.Drawing.Point(260, 492);
     this.btn_choice12.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btn_choice12.Name = "btn_choice12";
     this.btn_choice12.Size = new System.Drawing.Size(500, 300);
     this.btn_choice12.TabIndex = 29;
     //
     // btn_choice11
     //
     this.btn_choice11.BackColor = System.Drawing.Color.Blue;
     this.btn_choice11.bEnabled = true;
     this.btn_choice11.bOn = true;
     this.btn_choice11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_choice11.Location = new System.Drawing.Point(260, 420);
     this.btn_choice11.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btn_choice11.Name = "btn_choice11";
     this.btn_choice11.Size = new System.Drawing.Size(500, 300);
     this.btn_choice11.TabIndex = 28;
     //
     // btn_choice10
     //
     this.btn_choice10.BackColor = System.Drawing.Color.Blue;
     this.btn_choice10.bEnabled = true;
     this.btn_choice10.bOn = true;
     this.btn_choice10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_choice10.Location = new System.Drawing.Point(260, 344);
     this.btn_choice10.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btn_choice10.Name = "btn_choice10";
     this.btn_choice10.Size = new System.Drawing.Size(500, 300);
     this.btn_choice10.TabIndex = 27;
     //
     // btn_choice9
     //
     this.btn_choice9.BackColor = System.Drawing.Color.Blue;
     this.btn_choice9.bEnabled = true;
     this.btn_choice9.bOn = true;
     this.btn_choice9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_choice9.Location = new System.Drawing.Point(260, 266);
     this.btn_choice9.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btn_choice9.Name = "btn_choice9";
     this.btn_choice9.Size = new System.Drawing.Size(500, 300);
     this.btn_choice9.TabIndex = 26;
     //
     // btn_quit
     //
     this.btn_quit.BackColor = System.Drawing.Color.Blue;
     this.btn_quit.bEnabled = true;
     this.btn_quit.bOn = true;
     this.btn_quit.Location = new System.Drawing.Point(369, 0);
     this.btn_quit.Name = "btn_quit";
     this.btn_quit.Size = new System.Drawing.Size(71, 71);
     this.btn_quit.TabIndex = 25;
     //
     // btn_choice8
     //
     this.btn_choice8.BackColor = System.Drawing.Color.Blue;
     this.btn_choice8.bEnabled = true;
     this.btn_choice8.bOn = true;
     this.btn_choice8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_choice8.Location = new System.Drawing.Point(260, 193);
     this.btn_choice8.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btn_choice8.Name = "btn_choice8";
     this.btn_choice8.Size = new System.Drawing.Size(500, 300);
     this.btn_choice8.TabIndex = 0;
     //
     // btn_choice7
     //
     this.btn_choice7.BackColor = System.Drawing.Color.Blue;
     this.btn_choice7.bEnabled = true;
     this.btn_choice7.bOn = true;
     this.btn_choice7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_choice7.Location = new System.Drawing.Point(260, 107);
     this.btn_choice7.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btn_choice7.Name = "btn_choice7";
     this.btn_choice7.Size = new System.Drawing.Size(500, 300);
     this.btn_choice7.TabIndex = 0;
     //
     // btn_choice6
     //
     this.btn_choice6.BackColor = System.Drawing.Color.Blue;
     this.btn_choice6.bEnabled = true;
     this.btn_choice6.bOn = true;
     this.btn_choice6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_choice6.Location = new System.Drawing.Point(33, 492);
     this.btn_choice6.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btn_choice6.Name = "btn_choice6";
     this.btn_choice6.Size = new System.Drawing.Size(500, 300);
     this.btn_choice6.TabIndex = 0;
     //
     // btn_choice5
     //
     this.btn_choice5.BackColor = System.Drawing.Color.Blue;
     this.btn_choice5.bEnabled = true;
     this.btn_choice5.bOn = true;
     this.btn_choice5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_choice5.Location = new System.Drawing.Point(33, 420);
     this.btn_choice5.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btn_choice5.Name = "btn_choice5";
     this.btn_choice5.Size = new System.Drawing.Size(500, 300);
     this.btn_choice5.TabIndex = 0;
     //
     // btn_choice4
     //
     this.btn_choice4.BackColor = System.Drawing.Color.Blue;
     this.btn_choice4.bEnabled = true;
     this.btn_choice4.bOn = true;
     this.btn_choice4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_choice4.Location = new System.Drawing.Point(33, 344);
     this.btn_choice4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btn_choice4.Name = "btn_choice4";
     this.btn_choice4.Size = new System.Drawing.Size(500, 300);
     this.btn_choice4.TabIndex = 0;
     //
     // btn_choice3
     //
     this.btn_choice3.BackColor = System.Drawing.Color.Blue;
     this.btn_choice3.bEnabled = true;
     this.btn_choice3.bOn = true;
     this.btn_choice3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_choice3.Location = new System.Drawing.Point(33, 266);
     this.btn_choice3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btn_choice3.Name = "btn_choice3";
     this.btn_choice3.Size = new System.Drawing.Size(500, 300);
     this.btn_choice3.TabIndex = 0;
     //
     // btn_choice2
     //
     this.btn_choice2.BackColor = System.Drawing.Color.Blue;
     this.btn_choice2.bEnabled = true;
     this.btn_choice2.bOn = true;
     this.btn_choice2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_choice2.Location = new System.Drawing.Point(33, 193);
     this.btn_choice2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btn_choice2.Name = "btn_choice2";
     this.btn_choice2.Size = new System.Drawing.Size(500, 300);
     this.btn_choice2.TabIndex = 0;
     //
     // btn_choice1
     //
     this.btn_choice1.BackColor = System.Drawing.Color.Blue;
     this.btn_choice1.bEnabled = true;
     this.btn_choice1.bOn = true;
     this.btn_choice1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btn_choice1.Location = new System.Drawing.Point(50, 140);
     this.btn_choice1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     this.btn_choice1.Name = "btn_choice1";
     this.btn_choice1.Size = new System.Drawing.Size(500, 300);
     this.btn_choice1.TabIndex = 0;
     //
     // ChoiceWnd
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.BackColor = System.Drawing.Color.Black;
     this.ClientSize = new System.Drawing.Size(440, 480);
     this.Controls.Add(this.btn_choice12);
     this.Controls.Add(this.btn_choice11);
     this.Controls.Add(this.btn_choice10);
     this.Controls.Add(this.btn_choice9);
     this.Controls.Add(this.btn_quit);
     this.Controls.Add(this.notelabel);
     this.Controls.Add(this.btn_choice8);
     this.Controls.Add(this.btn_choice7);
     this.Controls.Add(this.btn_choice6);
     this.Controls.Add(this.btn_choice5);
     this.Controls.Add(this.btn_choice4);
     this.Controls.Add(this.btn_choice3);
     this.Controls.Add(this.btn_choice2);
     this.Controls.Add(this.btn_choice1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name = "ChoiceWnd";
     this.ResumeLayout(false);
 }
Пример #36
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
     this.textBox1 = new System.Windows.Forms.TextBox();
     this.button1 = new System.Windows.Forms.Button();
     this.roundRect1 = new Mndz.RectButton();
     this.SuspendLayout();
     //
     // textBox1
     //
     this.textBox1.BackColor = System.Drawing.Color.Bisque;
     this.textBox1.Font = new System.Drawing.Font("Arial", 26F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.textBox1.ForeColor = System.Drawing.Color.Red;
     this.textBox1.Location = new System.Drawing.Point(33, 31);
     this.textBox1.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
     this.textBox1.Multiline = true;
     this.textBox1.Name = "textBox1";
     this.textBox1.ReadOnly = true;
     this.textBox1.Size = new System.Drawing.Size(580, 235);
     this.textBox1.TabIndex = 21;
     this.textBox1.Text = "Message";
     //
     // button1
     //
     this.button1.BackColor = System.Drawing.Color.Bisque;
     this.button1.Font = new System.Drawing.Font("Tahoma", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.button1.ForeColor = System.Drawing.Color.Black;
     this.button1.Location = new System.Drawing.Point(281, 331);
     this.button1.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
     this.button1.Name = "button1";
     this.button1.Size = new System.Drawing.Size(109, 41);
     this.button1.TabIndex = 22;
     this.button1.Text = "button1";
     this.button1.UseVisualStyleBackColor = false;
     this.button1.Click += new System.EventHandler(this.button1_Click);
     //
     // roundRect1
     //
     this.roundRect1.BackColor = System.Drawing.Color.Transparent;
     this.roundRect1.bOn = true;
     this.roundRect1.Location = new System.Drawing.Point(0, 0);
     this.roundRect1.Margin = new System.Windows.Forms.Padding(0);
     this.roundRect1.Name = "roundRect1";
     this.roundRect1.Size = new System.Drawing.Size(642, 381);
     this.roundRect1.TabIndex = 20;
     //
     // MsgDlg
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.AutoScroll = true;
     this.ClientSize = new System.Drawing.Size(642, 381);
     this.ControlBox = false;
     this.Controls.Add(this.button1);
     this.Controls.Add(this.textBox1);
     this.Controls.Add(this.roundRect1);
     this.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
     this.Name = "MsgDlg";
     this.TopMost = true;
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Пример #37
0
 private void OnBPArmyPainter(RectButton button, Vector2 p)
 {
     Next  = game.ColorSchemeScreen.Index;
     State = ScreenState.ChangeNext;
 }