mirror of https://github.com/AxioDL/amuse.git
Arrow-key autoplay
This commit is contained in:
parent
e55271111a
commit
343c674c9b
|
@ -303,6 +303,14 @@ struct AppCallback : boo::IApplicationCallback
|
||||||
void SelectSFX(int sfxId)
|
void SelectSFX(int sfxId)
|
||||||
{
|
{
|
||||||
m_sfxId = sfxId;
|
m_sfxId = sfxId;
|
||||||
|
|
||||||
|
bool playing = m_vox && m_vox->state() == amuse::VoiceState::Playing;
|
||||||
|
if (playing)
|
||||||
|
{
|
||||||
|
m_vox->keyOff();
|
||||||
|
m_vox = m_engine->fxStart(m_sfxId, m_volume, 0.f);
|
||||||
|
}
|
||||||
|
|
||||||
UpdateSFXDisplay();
|
UpdateSFXDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue