Change GuiProfile to use Sound Asset

-Added SoundAssetInspector to bypass circular issue
-Added SoundAsset to GuiTypes
This commit is contained in:
marauder2k7 2022-08-29 23:40:51 +01:00
parent ebbf0947b3
commit 5d85664b40
10 changed files with 91 additions and 106 deletions

View file

@ -29,9 +29,6 @@ function UI::onDestroyGameServer(%this){}
function UI::initClient(%this)
{
//Load UI stuff
//we need to load this because some of the menu profiles use the sounds here
//%this.queueExec("./datablocks/guiSounds");
//Profiles
%this.queueExec("./scripts/profiles");

View file

@ -100,8 +100,8 @@ new GuiControlProfile( GuiMenuButtonProfile )
canKeyFocus = false;
//bitmapAsset = "UI:menu_button_image";
hasBitmapArray = false;
soundButtonDown = menuButtonPressed;
soundButtonOver = menuButtonHover;
soundButtonDown = "UI:buttonClick";
soundButtonOver = "UI:buttonHover";
category = "Core";
};

View file

@ -1 +1,10 @@
<SoundAsset canSave="true" canSaveDynamicFields="true" AssetName="buttonClick" soundFile="@assetFile=buttonClick.wav" PitchAdjust="1" VolumeAdjust="1" is3D="false" isLooping="false" isStreaming="false" useHardware="false" minDistance="1" maxDistance="100" coneInsideAngle="360" coneOutsideAngle="360" coneOutsideVolume="1" rolloffFactor="-1" scatterDistance="0 0 0"/>
<SoundAsset
AssetName="buttonClick"
soundFile="@assetFile=buttonClick.wav"
PitchAdjust="1"
VolumeAdjust="1"
is3D="false"
minDistance="1"
maxDistance="100"
sourceGroup="AudioChannelGui"
/>

View file

@ -1 +1,10 @@
<SoundAsset canSave="true" canSaveDynamicFields="true" AssetName="buttonHover" soundFile="@assetFile=buttonHover.wav" PitchAdjust="1" VolumeAdjust="1" is3D="false" isLooping="false" isStreaming="false" useHardware="true" minDistance="1" maxDistance="120" coneInsideAngle="360" coneOutsideAngle="360" coneOutsideVolume="1" rolloffFactor="-1" scatterDistance="0 0 0"/>
<SoundAsset
AssetName="buttonHover"
soundFile="@assetFile=buttonHover.wav"
PitchAdjust="1"
VolumeAdjust="1"
is3D="false"
minDistance="1"
maxDistance="100"
sourceGroup="AudioChannelGui"
/>