public void UpdateDuration(float val) { int duration = (int)val; config.duration = duration; string str = "Duration: " + config.duration + " minutes"; durationLabel.SetText(str); }
public void RevertSettings() { masterVolumeSlider.Value = Session.session.masterVolume; sfxVolumeSlider.Value = Session.session.sfxVolume; musicVolumeSlider.Value = Session.session.musicVolume; mouseXSlider.Value = Session.session.mouseSensitivityX; mouseYSlider.Value = Session.session.mouseSensitivityY; userNameBox.SetText(Session.session.userName); }
public void UpdateBots(float val) { int bots = (int)val; config.bots = bots; string str = "Bots: " + config.bots; botsLabel.SetText(str); }
public void UpdateDevice(float val) { GD.Print("Changed to " + val + ", " + deviceFloat); int valInt = (int)val; DeviceManager.Devices device = (DeviceManager.Devices)valInt; string str = "Device: " + DeviceManager.DeviceName(device); deviceLabel.SetText(str); }
public void Send() { if (composeBox != null && composeBox.GetText() != "") { string message = composeBox.GetText(); ReceiveNamedMessage(message, myName); Rpc(nameof(ReceiveNamedMessage), message, myName); composeBox.SetText(""); } }
public void Send() { if (composeBox != null && composeBox.GetText() != "" && nameBox != null) { string name = GetName(); string message = name + "(" + myId + "): " + composeBox.GetText(); ReceiveMessage(message); Rpc(nameof(ReceiveMessage), message); composeBox.SetText(""); } }
public void RevertSettings() { masterVolumeSlider.Value = Session.session.masterVolume; sfxVolumeSlider.Value = Session.session.sfxVolume; musicVolumeSlider.Value = Session.session.musicVolume; mouseXSlider.Value = Session.session.mouseSensitivityX; mouseYSlider.Value = Session.session.mouseSensitivityY; int deviceInt = (int)Session.session.player1Device; deviceFloat = (float)deviceInt; userNameBox.SetText(Session.session.userName); }
public void UpdateItemInfo() { if (itemSelected == -1) { return; } itemInfo.Show(); useButton.Show(); dropButton.Show(); ItemData item = itemData[itemSelected]; string text = item.GetInfo() + ":\n"; text += item.GetMoreInfo(); itemInfo.SetText(text); }
public void ReceiveMessage(string message) { if (messages.Count > 50) { messages.Remove(messages.First()); } messages.Add(message); string str = ""; for (int i = 0; i < messages.Count; i++) { str += messages[i] + "\n"; } messageBox.SetText(str); }
void BuildPlayers() { NetworkSession netSes = Session.session.netSes; string names = "Players(" + netSes.playerData.Count + ")"; if (countDownActive) { names += " Starting in " + countDown; } names += "\n"; foreach (KeyValuePair <int, PlayerData> entry in netSes.playerData) { names += entry.Value.name + "\n"; } playersBox.SetText(names); }
public void Update() { Actor player = Session.session.player; if (player == null) { GD.Print("Player 1 doesn't exist."); return; } string healthText = "Health: " + player.GetHealth(); healthBox.SetText(healthText); string itemText = player.ItemInfo(); itemBox.SetText(itemText); string objectiveText = Session.session.GetObjectiveText(); objectiveBox.SetText(objectiveText); }
public void UpdateWeightInfo(int weight) { string text = "Weight: " + weight; weightInfo.SetText(text); }
public void UpdateMouseY(float val) { string str = "Mouse Sensitivity Y: " + val; mouseYLabel.SetText(str); }
public void UpdateMusicVolume(float val) { string str = "Music Volume: " + val; musicVolumeLabel.SetText(str); }
public void UpdateSfxVolume(float val) { string str = "Sound Effects Volume: " + val; sfxVolumeLabel.SetText(str); }
public void UpdateMasterVolume(float val) { string str = "Master Volume: " + val; masterVolumeLabel.SetText(str); }