コード例 #1
0
ファイル: ButtonFactory.cs プロジェクト: hakuliu/Schematogy
        public static Button getResistorButton(Rectangle initialLocation)
        {
            Button result = new Button();
            result.IdleTexture = "ResistorButtonIdle";
            result.HoverTexture = "ResisteoButtonHover";
            result.PressedTexture = "ResistorButtonPressed";
            result.DisabledTexture = "ResistorButtonDisabled";
            result.HoverEnabled = true;
            result.PressDownEnabled = true;
            result.Enabled = true;
            result.Bound = initialLocation;

            return result;
        }
コード例 #2
0
ファイル: Game1.cs プロジェクト: hakuliu/Schematogy
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     window = new UI.WindowFrame();
     theGrid = new Grid();
     testButton = new Button();
     testButton.Bound = new Rectangle(500, 500, 100, 100);
     testButton.Enabled = true;
     testButton.HoverEnabled = true;
     testButton.PressDownEnabled = true;
     testButton.IdleTexture = "ResistorButtonIdle";
     testButton.HoverTexture = "ResistorButtonHover";
     testButton.PressedTexture = "ResistorButtonPressed";
 }