Beispiel #1
0
 public void HideServer()
 {
     selectionButton.Hide();
     startServerButton.Hide();
     portBox.Hide();
     startServerButton.SetText("Host Game");
 }
Beispiel #2
0
    public void RefreshInventory()
    {
        itemList.Clear();
        itemData = Session.session.player.GetAllItems();
        UpdateWeightInfo(Item.TotalWeight(itemData));

        itemData = Item.FilterByCategory(itemData, activeFilter);
        foreach (ItemData item in itemData)
        {
            itemList.AddItem(item.ToString());
        }
        itemSelected = -1;
        if (itemInfo != null)
        {
            itemInfo.Hide();
        }
        if (useButton != null)
        {
            useButton.Hide();
        }
        if (dropButton != null)
        {
            dropButton.Hide();
        }
    }
Beispiel #3
0
 public void HideClient()
 {
     selectionButton.Hide();
     startClientButton.Hide();
     portBox.Hide();
     addressBox.Hide();
     nameBox.Hide();
     startClientButton.SetText("Join Game");
 }
Beispiel #4
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);
    }