void FarPlugin::Config() { FarDialog & dlg = Dialogs()[L"SetupDialog"]; dlg.ResetControls(); dlg.LoadState(options); bool Repeat = true; while (Repeat) { Repeat = false; intptr_t res = dlg.Execute(); switch (res) { case 0: dlg.SaveState(options); SaveOptions(); Repeat = false; break; case 1: KeyConfig(); break; case 2: About(); break; case 3: SoundConfig(); break; } } }
/* ** s = "Sound1 [SoundN ...]" */ /* virtual */ void CAnimation_RandomSound::Init(const char *s, lua_State *) { const std::string str(s); const size_t len = str.size(); for (size_t begin = 0; begin != std::string::npos;) { const size_t end = std::min(len, str.find(' ', begin)); this->sounds.push_back(SoundConfig(str.substr(begin, end - begin))); begin = str.find_first_not_of(' ', end); } }
#include "ui.h" #include "widgets.h" /*---------------------------------------------------------------------------- -- Variables ----------------------------------------------------------------------------*/ /** ** Various sounds used in game. ** ** FIXME: @todo Must remove static config. */ GameSound GameSounds #ifndef laterUSE_CCL ={ SoundConfig("placement error"), SoundConfig("placement success"), SoundConfig("click"), SoundConfig("transport docking"), SoundConfig("building construction"), SoundConfig("rescue (human) UNUSED"), } #endif ; /** ** Selection handling */ struct SelectionHandling { Origin Source; /// origin of the sound CSound *Sound; /// last sound played by this unit