示例#1
0
 public override void Draw(Renderer renderer)
 {
     renderer.Draw(GraphicsEngine.pixel, new Rectangle(0, 0, Main.WindowWidth, Main.WindowHeight), Shortcuts.BG_COLOR * 0.5f);
     renderer.DrawString(GUIEngine.font, "Press the sequence (mouse and/or keyboard) you wish to select...",
                         new Rectangle(0, 0, Main.WindowWidth, Main.WindowHeight), Color.White, Renderer.TextAlignment.Center);
     renderer.DrawString(GUIEngine.font, seq.ToString(GUIEngine.font, Main.windowWidth, true),
                         new Rectangle(0, 50, Main.WindowWidth, Main.WindowHeight), Color.White, Renderer.TextAlignment.Center);
     base.Draw(renderer);
 }
示例#2
0
        public HotkeyControl(int x, int y, int buttonOffset, String txt, IO.InputSequence key)
        {
            this.buttonOffset = buttonOffset;
            this.key = key;

            b_Key = new MenuButton(x + buttonOffset, y + 2, 240, 16, key.ToString());
            b_Key.Text = key.ToString(GUIEngine.font, (int)b_Key.size.X, false);
            b_Key.Font = GUIEngine.font;
            b_Key.TextOffset = new Vector2(0, 4);
            b_Key.DrawBottomLine = false;
            b_Key.onClicked += new Button.ClickedEventHandler(b_Key_onClicked);

            b_Text = new Label(x + 2, y - 1, txt);
            b_Text.foreground = Color.White;

            position = new Vector2(x, y);
            Size = new Vector2(buttonOffset + 240, 20);

            Key = key;
        }
示例#3
0
        public HotkeyControl(int x, int y, int buttonOffset, String txt, IO.InputSequence key)
        {
            this.buttonOffset = buttonOffset;
            this.key          = key;

            b_Key                = new MenuButton(x + buttonOffset, y + 2, 240, 16, key.ToString());
            b_Key.Text           = key.ToString(GUIEngine.font, (int)b_Key.size.X, false);
            b_Key.Font           = GUIEngine.font;
            b_Key.TextOffset     = new Vector2(0, 4);
            b_Key.DrawBottomLine = false;
            b_Key.onClicked     += new Button.ClickedEventHandler(b_Key_onClicked);

            b_Text            = new Label(x + 2, y - 1, txt);
            b_Text.foreground = Color.White;

            position = new Vector2(x, y);
            Size     = new Vector2(buttonOffset + 240, 20);

            Key = key;
        }
示例#4
0
 public void SetButtonSize(int w)
 {
     b_Key.Size = new Vector2(w - 7, b_Key.Size.Y);
     b_Key.Text = key.ToString(GUIEngine.font, (int)b_Key.size.X, false);
 }
示例#5
0
 void a_onSequenceSelected(object sender, IO.InputSequence key)
 {
     Key.CopyFrom(key);
     b_Key.Text = Key.ToString(b_Key.Font, (int)b_Key.size.X, false);
 }