1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Limit properly the sound setting at updateSound runtime step (#5753)

* Limit properly the sound setting at updateSound runtime step

Fix #5026

* Add a comment
This commit is contained in:
Loïc Blot 2017-05-13 12:03:11 +02:00 committed by GitHub
parent 9b8ca3a746
commit 6673aff685
2 changed files with 11 additions and 4 deletions

View file

@ -69,7 +69,7 @@ void GUIVolumeChange::regenerateGui(v2u32 screensize)
Remove stuff
*/
removeChildren();
/*
Calculate new sizes and positions
*/
@ -79,12 +79,11 @@ void GUIVolumeChange::regenerateGui(v2u32 screensize)
screensize.X/2 + 380/2,
screensize.Y/2 + 200/2
);
DesiredRect = rect;
recalculateAbsolutePosition(false);
v2s32 size = rect.getSize();
v2s32 topleft_client(40, 0);
int volume = (int)(g_settings->getFloat("sound_volume")*100);
/*
Add stuff