MCPcopy Create free account
hub / github.com/RustOtomeLab/RustEng / execute_bgm_volume

Method execute_bgm_volume

src/executors/executor.rs:245–255  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

243
244 pub(crate) fn execute_bgm_volume(&mut self) -> Result<(), EngineError> {
245 if let Some(window) = self.weak.upgrade() {
246 let volume = window.get_main_volume() / 100.0;
247 let bgm_volume = window.get_bgm_volume() / 100.0;
248 self.media_player
249 .borrow()
250 .change_bgm_volume(volume * bgm_volume);
251 }
252
253 Ok(())
254 }
255
256 pub(crate) fn execute_voice_volume(&mut self) -> Result<(), EngineError> {
257 if let Some(window) = self.weak.upgrade() {
258 let volume = window.get_main_volume() / 100.0;

Callers 1

uiFunction · 0.80

Calls 1

change_bgm_volumeMethod · 0.80

Tested by

no test coverage detected