Exemple #1
0
    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 InitSettings()
    {
        SettingsDb db = new SettingsDb();

        masterVolume      = Util.ToFloat(db.SelectSetting("master_volume"));
        sfxVolume         = Util.ToFloat(db.SelectSetting("sfx_volume"));
        musicVolume       = Util.ToFloat(db.SelectSetting("music_volume"));
        userName          = db.SelectSetting("username");
        mouseSensitivityX = Util.ToFloat(db.SelectSetting("mouse_sensitivity_x"));
        mouseSensitivityY = Util.ToFloat(db.SelectSetting("mouse_sensitivity_y"));
        player1Device     = (DeviceManager.Devices)Util.ToInt(db.SelectSetting("player1_device"));

        Sound.RefreshVolume();
    }