Ejemplo n.º 1
0
    void InitControls()
    {
        gamemodeLabel = (Godot.TextEdit)Menu.TextBox("Arena Config");
        AddChild(gamemodeLabel);


        botsSlider = Menu.HSlider(0f, 16f, config.bots, 1f);
        AddChild(botsSlider);
        botsSlider.Connect("value_changed", this, nameof(UpdateBots));
        botsLabel = Menu.TextBox("Bots: " + config.bots);
        AddChild(botsLabel);

        durationSlider = Menu.HSlider(0f, 60f, config.duration, 1f);
        AddChild(durationSlider);
        durationSlider.Connect("value_changed", this, nameof(UpdateDuration));
        durationLabel = Menu.TextBox("Duration: " + config.duration + " minutes");
        AddChild(durationLabel);


        powerupsButton = Menu.Button("Spawn powerups: " + config.usePowerups, TogglePowerups);
        AddChild(powerupsButton);

        kitsButton = Menu.Button("Spawn with kits: " + config.useKits, ToggleKits);
        AddChild(kitsButton);
    }
Ejemplo n.º 2
0
    public void Init()
    {
        messageBox          = (Godot.TextEdit)Menu.TextBox();
        messageBox.Readonly = true;
        AddChild(messageBox);

        composeBox = (Godot.TextEdit)Menu.TextBox();
        AddChild(composeBox);

        sendButton = (Godot.Button)Menu.Button("Send", Send);
        AddChild(sendButton);

        mainMenuButton = (Godot.Button)Menu.Button("Main Menu", ReturnToMainMenu);
        AddChild(mainMenuButton);

        readyButton = (Godot.Button)Menu.Button("Ready", ToggleReady);
        AddChild(readyButton);

        playersBox          = (Godot.TextEdit)Menu.TextBox("");
        playersBox.Readonly = true;
        AddChild(playersBox);


        InitNetwork();

        ScaleControls();
    }
Ejemplo n.º 3
0
    public void InitControls()
    {
        mainMenuButton = (Godot.Button)Menu.Button("Main Menu", MainMenu);
        AddChild(mainMenuButton);

        serverButton = (Godot.Button)Menu.Button("Host", ShowServer);
        AddChild(serverButton);

        clientButton = (Godot.Button)Menu.Button("Join", ShowClient);
        AddChild(clientButton);

        selectionButton = (Godot.Button)Menu.Button("Back", ShowSelection);
        AddChild(selectionButton);

        portBox = (Godot.TextEdit)Menu.TextBox("" + NetworkSession.DefaultPort, false);
        AddChild(portBox);

        startServerButton = (Godot.Button)Menu.Button("Host Game", StartServer);
        AddChild(startServerButton);

        addressBox = (Godot.TextEdit)Menu.TextBox(NetworkSession.DefaultServerAddress, false);
        AddChild(addressBox);

        nameBox = (Godot.TextEdit)Menu.TextBox("Name", false);
        AddChild(nameBox);

        startClientButton = (Godot.Button)Menu.Button("Join Game", StartClient);
        AddChild(startClientButton);
    }
Ejemplo n.º 4
0
 public void SetAddressBox(Godot.TextEdit box)
 {
     if (addressBox != null)
     {
         addressBox.QueueFree();
     }
     addressBox = box;
     AddChild(box);
 }
Ejemplo n.º 5
0
 public void SetNameBox(Godot.TextEdit box)
 {
     if (nameBox != null)
     {
         nameBox.QueueFree();
     }
     nameBox = box;
     AddChild(box);
 }
Ejemplo n.º 6
0
 public void SetComposeBox(Godot.TextEdit box)
 {
     if (composeBox != null)
     {
         composeBox.QueueFree();
     }
     composeBox = box;
     AddChild(box);
 }
Ejemplo n.º 7
0
 public void SetMessageBox(Godot.TextEdit box)
 {
     if (messageBox != null)
     {
         messageBox.QueueFree();
     }
     messageBox = box;
     box.SetReadonly(true);
     AddChild(box);
 }
Ejemplo n.º 8
0
    // Called when the node enters the scene tree for the first time.
    public override void _EnterTree()
    {
        this.FindChild <Label>().Text = Player.Hardcore ? "New Hardcore Top Score " + Player.score.ToString() : "New Top Score " + Player.score.ToString();
        input  = this.FindChild <TextEdit>();
        submit = this.FindChild <Button>();
        //input.Text = "";

        if (!Score.canEnterScore(Player.score))
        {
            QueueFree();
        }
    }
Ejemplo n.º 9
0
 public void SetPlayersBox(Godot.TextEdit box)
 {
     if (playersBox != null)
     {
         playersBox.QueueFree();
     }
     addressBox = box;
     if (box != null)
     {
         AddChild(box);
     }
 }
Ejemplo n.º 10
0
    public void InitControls()
    {
        activeFilter = Item.Categories.Weapons;

        closeButton = (Godot.Button)Menu.Button(text: "Close", onClick: Close);
        AddChild(closeButton);

        itemList = new ItemList();
        AddChild(itemList);
        itemList.AllowRmbSelect = true;
        itemList.Connect("item_selected", this, nameof(SelectItem));
        itemList.Connect("item_activated", this, nameof(UseItem));
        itemList.Connect("item_rmb_selected", this, nameof(DropItem));

        itemInfo          = (Godot.TextEdit)Menu.TextBox("");
        itemInfo.Readonly = true;
        itemInfo.Hide();
        AddChild(itemInfo);

        useButton = (Godot.Button)Menu.Button(text: "Use", onClick: UseItemAdapter);
        AddChild(useButton);
        useButton.Hide();

        dropButton = (Godot.Button)Menu.Button(text: "Drop", onClick: DropItemAdapter);
        AddChild(dropButton);
        dropButton.Hide();

        stashButton = (Godot.Button)Menu.Button(text: "Stash", onClick: StashItem);
        AddChild(stashButton);
        RefreshStashItemInfo();

        weaponsButton = (Godot.Button)Menu.Button(text: "Weapons", onClick: FilterWeapons);
        AddChild(weaponsButton);

        apparelButton = (Godot.Button)Menu.Button(text: "Apparel", onClick: FilterApparel);
        AddChild(apparelButton);

        aidButton = (Godot.Button)Menu.Button(text: "Aid", onClick: FilterAid);
        AddChild(aidButton);

        miscButton = (Godot.Button)Menu.Button(text: "Misc", onClick: FilterMisc);
        AddChild(miscButton);

        ammoButton = (Godot.Button)Menu.Button(text: "Ammo", onClick: FilterAmmo);
        AddChild(ammoButton);

        weightInfo          = (Godot.TextEdit)Menu.TextBox("WeightInfo");
        weightInfo.Readonly = true;
        AddChild(weightInfo);
    }
Ejemplo n.º 11
0
    public void InitControls()
    {
        mainMenuButton = Menu.Button("Main Menu", MainMenu);
        AddChild(mainMenuButton);

        revertButton = Menu.Button("Revert", RevertSettings);
        AddChild(revertButton);

        saveButton = Menu.Button("Save", SaveSettings);
        AddChild(saveButton);

        masterVolumeSlider = Menu.HSlider(0f, 1.0f, Session.session.masterVolume, 0.05f);
        AddChild(masterVolumeSlider);
        masterVolumeSlider.Connect("value_changed", this, nameof(UpdateMasterVolume));

        masterVolumeLabel = (Godot.TextEdit)Menu.TextBox("Master Volume: " + Session.session.masterVolume, false);
        AddChild(masterVolumeLabel);

        sfxVolumeSlider = Menu.HSlider(0f, 1.0f, Session.session.sfxVolume, 0.05f);
        AddChild(sfxVolumeSlider);
        sfxVolumeSlider.Connect("value_changed", this, nameof(UpdateSfxVolume));

        sfxVolumeLabel = (Godot.TextEdit)Menu.TextBox("Sound Effects Volume: " + Session.session.sfxVolume, false);
        AddChild(sfxVolumeLabel);

        musicVolumeSlider = Menu.HSlider(0f, 1.0f, Session.session.musicVolume, 0.05f);
        AddChild(musicVolumeSlider);
        musicVolumeSlider.Connect("value_changed", this, nameof(UpdateMusicVolume));

        musicVolumeLabel = (Godot.TextEdit)Menu.TextBox("Music Volume: " + Session.session.musicVolume, false);
        AddChild(musicVolumeLabel);

        mouseXSlider = Menu.HSlider(0f, 1.0f, Session.session.mouseSensitivityX, 0.05f);
        AddChild(mouseXSlider);
        mouseXSlider.Connect("value_changed", this, nameof(UpdateMouseX));

        mouseXLabel = (Godot.TextEdit)Menu.TextBox("Mouse Sensitivity X: " + Session.session.mouseSensitivityX, false);
        AddChild(mouseXLabel);

        mouseYSlider = Menu.HSlider(0f, 1.0f, Session.session.mouseSensitivityY, 0.05f);
        AddChild(mouseYSlider);
        mouseYSlider.Connect("value_changed", this, nameof(UpdateMouseY));

        mouseYLabel = Menu.TextBox("Mouse Sensitivity Y: " + Session.session.mouseSensitivityY, false);
        AddChild(mouseYLabel);

        userNameBox = Menu.TextBox(Session.session.userName, false);
        AddChild(userNameBox);
    }
Ejemplo n.º 12
0
    public void Init()
    {
        healthBox          = (Godot.TextEdit)Menu.TextBox("health");
        healthBox.Readonly = true;
        AddChild(healthBox);

        itemBox          = (Godot.TextEdit)Menu.TextBox("item");
        itemBox.Readonly = true;
        AddChild(itemBox);

        objectiveBox          = (Godot.TextEdit)Menu.TextBox("Object Info");
        objectiveBox.Readonly = true;
        AddChild(objectiveBox);

        ScaleControls();
    }
Ejemplo n.º 13
0
    void InitControls()
    {
        background = Menu.BackgroundBox();
        AddChild(background);

        mainMenuButton = Menu.Button("Main Menu", () => {
            ReturnToMainMenu();
        });
        AddChild(mainMenuButton);


        titleLabel = (Godot.TextEdit)Menu.TextBox(EndCopy());
        AddChild(titleLabel);

        creditsLabel = (Godot.TextEdit)Menu.TextBox(CreditsCopy());
        AddChild(creditsLabel);
    }
Ejemplo n.º 14
0
  void InitServerControls(){
    messageBox = (Godot.TextEdit)Menu.TextBox();
    messageBox.Readonly = true;
    AddChild(messageBox);
    
    
    mainMenuButton = (Godot.Button)Menu.Button("Main Menu", ReturnToMainMenu);
    AddChild(mainMenuButton);
    
    playersBox = (Godot.TextEdit)Menu.TextBox("");
    playersBox.Readonly = true;
    AddChild(playersBox);

    Node arenaConfigNode = Menu.SubMenuFactory(Menu.SubMenus.ArenaConfig);
    AddChild(arenaConfigNode);
    arenaConfig = arenaConfigNode as IMenu;
  }
Ejemplo n.º 15
0
    public void InitControls()
    {
        background = Menu.BackgroundBox();
        AddChild(background);

        mainMenuButton = Menu.Button("Main Menu", MainMenu);
        AddChild(mainMenuButton);

        revertButton = Menu.Button("Revert", RevertSettings);
        AddChild(revertButton);

        saveButton = Menu.Button("Save", SaveSettings);
        AddChild(saveButton);

        masterVolumeSlider = Menu.HSlider(0f, 1.0f, Session.session.masterVolume, 0.05f);
        AddChild(masterVolumeSlider);
        masterVolumeSlider.Connect("value_changed", this, nameof(UpdateMasterVolume));

        masterVolumeLabel = (Godot.TextEdit)Menu.TextBox("Master Volume: " + Session.session.masterVolume, false);
        AddChild(masterVolumeLabel);

        sfxVolumeSlider = Menu.HSlider(0f, 1.0f, Session.session.sfxVolume, 0.05f);
        AddChild(sfxVolumeSlider);
        sfxVolumeSlider.Connect("value_changed", this, nameof(UpdateSfxVolume));

        sfxVolumeLabel = (Godot.TextEdit)Menu.TextBox("Sound Effects Volume: " + Session.session.sfxVolume, false);
        AddChild(sfxVolumeLabel);

        musicVolumeSlider = Menu.HSlider(0f, 1.0f, Session.session.musicVolume, 0.05f);
        AddChild(musicVolumeSlider);
        musicVolumeSlider.Connect("value_changed", this, nameof(UpdateMusicVolume));

        musicVolumeLabel = (Godot.TextEdit)Menu.TextBox("Music Volume: " + Session.session.musicVolume, false);
        AddChild(musicVolumeLabel);

        mouseXSlider = Menu.HSlider(0f, 5.0f, Session.session.mouseSensitivityX, 0.05f);
        AddChild(mouseXSlider);
        mouseXSlider.Connect("value_changed", this, nameof(UpdateMouseX));

        mouseXLabel = (Godot.TextEdit)Menu.TextBox("Mouse Sensitivity X: " + Session.session.mouseSensitivityX, false);
        AddChild(mouseXLabel);

        mouseYSlider = Menu.HSlider(0f, 5.0f, Session.session.mouseSensitivityY, 0.05f);
        AddChild(mouseYSlider);
        mouseYSlider.Connect("value_changed", this, nameof(UpdateMouseY));

        mouseYLabel = Menu.TextBox("Mouse Sensitivity Y: " + Session.session.mouseSensitivityY, false);
        AddChild(mouseYLabel);

        userNameBox = Menu.TextBox(Session.session.userName, false);
        AddChild(userNameBox);

        string deviceString = DeviceManager.DeviceName(Session.session.player1Device);

        deviceLabel = (Godot.TextEdit)Menu.TextBox("Device: " + deviceString, false);
        AddChild(deviceLabel);

        int deviceInt = (int)Session.session.player1Device;

        deviceSlider = Menu.HSlider(0f, 4.0f, (float)deviceInt, 1.0f);
        AddChild(deviceSlider);
        deviceSlider.Connect("value_changed", this, nameof(UpdateDevice));
    }