Merge branch 'develop' into gui-fixes

This commit is contained in:
devZoGok
2025-06-23 08:22:11 +03:00
4 changed files with 16 additions and 2 deletions
+1
View File
@@ -1,3 +1,4 @@
music = {tracks = {}}
numGui = 6
Size = {x = 140, y = 20}
+6
View File
@@ -1,4 +1,10 @@
Size = {x = 100, y = 20}
music = {
loop = true,
shuffle = false,
delay = 2000,
tracks = {'intro.ogg'}
}
gui = {
{
+8 -1
View File
@@ -543,6 +543,13 @@ namespace battleship{
if(musicTblOpt == sol::nullopt) return;
sol::table musicTbl = SOL_STATE_VIEW["music"], tracksTbl = musicTbl["tracks"];
SoundManager *sm = SoundManager::getSingleton();
if(tracksTbl.size() == 0){
sm->clearPlaylist();
return;
}
bool loop = musicTbl["loop"], shuffle = musicTbl["shuffle"];
int delay = musicTbl["delay"].get_or(0);
int numTracks = tracksTbl.size();
@@ -554,7 +561,7 @@ namespace battleship{
trackPaths.push_back(GameManager::getSingleton()->getPath() + "Sounds/Music/" + track);
}
SoundManager::getSingleton()->play(trackPaths, 100, delay, loop, shuffle);
sm->play(trackPaths, 100, delay, loop, shuffle);
}
void ConcreteGuiManager::readLuaScreenScript(