Tutorial - Settings Screen
Introduction
Defining SettingsViewModel
using Gum.Mvvm; namespace BindingTutorial.ViewModels; public class SettingsViewModel : ViewModel { public float MusicVolume { get => Get<float>(); set => Set(value); } public float SfxVolume { get => Get<float>(); set => Set(value); } [DependsOn(nameof(SfxVolume))] public string SfxVolumeDisplay => $"SFX: {SfxVolume:N0}"; [DependsOn(nameof(MusicVolume))] public string MusicVolumeDisplay => $"Music: {MusicVolume:N0}"; }Defining SettingsScreen
Using the SettingsScreen


Last updated
Was this helpful?

