コード例 #1
0
ファイル: InGameMenuMain.cs プロジェクト: aranval/project.ONE
    public override void _PhysicsProcess(float delta)
    {
        if (Input.IsActionJustPressed("ui_pause"))
        {
            this.Hide();
            GetTree().Paused = false;
        }
        cont  = (TextureButton)GetChild(0).GetChild(0).GetNode("Continue");
        start = (TextureButton)GetChild(0).GetChild(0).GetNode("Start");
        quit  = (TextureButton)GetChild(0).GetChild(0).GetNode("Quit");

        if (cont.IsHovered())
        {
            cont.GrabFocus();
        }

        if (start.IsHovered())
        {
            start.GrabFocus();
        }

        if (quit.IsHovered())
        {
            quit.GrabFocus();
        }
    }
コード例 #2
0
ファイル: MainMenuMain.cs プロジェクト: aranval/project.ONE
    public void GUIControls()
    {
        cont  = (TextureButton)GetChild(0).GetChild(1).GetChild(0).GetChild(1).GetNode("Continue");
        start = (TextureButton)GetChild(0).GetChild(1).GetChild(0).GetChild(1).GetNode("Start");
        quit  = (TextureButton)GetChild(0).GetChild(1).GetChild(0).GetChild(1).GetNode("Quit");

        if (start.IsHovered())
        {
            start.GrabFocus();
        }

        if (quit.IsHovered())
        {
            quit.GrabFocus();
        }
    }
コード例 #3
0
ファイル: PreArcadeLevel.cs プロジェクト: nath54/Cube3
 public override void _Input(InputEvent @event)
 {
     if (click)
     {
         if (@event is InputEventScreenTouch)
         {
             TextureButton tbt = (TextureButton)GetNode("Bt_saveandexit");
             if (!tbt.IsHovered())
             {
                 globale.chargement("res://levels/World.tscn");
                 //GetTree().ChangeScene("res://levels/World.tscn");
             }
         }
         else if (@event is InputEventKey ie)
         {
             if (Input.IsActionPressed("jump"))
             {
                 globale.chargement("res://levels/World.tscn");
                 //GetTree().ChangeScene("res://levels/World.tscn");
             }
         }
     }
 }