Merge remote-tracking branch 'refs/remotes/wizards/master'
This commit is contained in:
commit
a3e61685c8
2 changed files with 11 additions and 3 deletions
|
|
@ -54,7 +54,7 @@ public sealed class AudioUIController : UIController
|
|||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
{
|
||||
var resource = _cache.GetResource<AudioResource>(value);
|
||||
var resource = GetSoundOrFallback(value, CCVars.UIClickSound.DefaultValue);
|
||||
var source =
|
||||
_audioManager.CreateAudioSource(resource);
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ public sealed class AudioUIController : UIController
|
|||
{
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
{
|
||||
var hoverResource = _cache.GetResource<AudioResource>(value);
|
||||
var hoverResource = GetSoundOrFallback(value, CCVars.UIHoverSound.DefaultValue);
|
||||
var hoverSource =
|
||||
_audioManager.CreateAudioSource(hoverResource);
|
||||
|
||||
|
|
@ -95,4 +95,12 @@ public sealed class AudioUIController : UIController
|
|||
UIManager.SetHoverSound(null);
|
||||
}
|
||||
}
|
||||
|
||||
private AudioResource GetSoundOrFallback(string path, string fallback)
|
||||
{
|
||||
if (!_cache.TryGetResource(path, out AudioResource? resource))
|
||||
return _cache.GetResource<AudioResource>(fallback);
|
||||
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ SSH_PORT = 22
|
|||
RSS_FILE = "changelog.xml"
|
||||
XSL_FILE = "stylesheet.xsl"
|
||||
HOST_KEYS = [
|
||||
"AAAAC3NzaC1lZDI1NTE5AAAAIEE8EhnPjb3nIaAPTXAJHbjrwdGGxHoM0f1imCK0SygD"
|
||||
"AAAAC3NzaC1lZDI1NTE5AAAAIOBpGO/Qc6X0YWuw7z+/WS/65+aewWI29oAyx+jJpCmh"
|
||||
]
|
||||
|
||||
# RSS feed parameters, change these
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue