Finalize options UI and music state - v1.9.1
This commit is contained in:
parent
c599fd1fef
commit
fbe39fb089
Binary file not shown.
Binary file not shown.
|
|
@ -857,9 +857,9 @@ int main(void)
|
|||
// Update
|
||||
//----------------------------------------------------------------------------------
|
||||
// Update ONLY active music streams and ensure others are fully stopped
|
||||
if (currentState == MAIN_MENU || currentState == LOAD_WORLD_MENU || currentState == CREATE_WORLD_MENU ||
|
||||
currentState == CHECKING_UPDATES || currentState == UPDATE_FOUND || currentState == UPDATE_NOTES ||
|
||||
currentState == DOWNLOADING_UPDATE) {
|
||||
bool inGame = (currentState == GAMEPLAY || currentState == PAUSE_MENU || currentState == CRAFTING_GUI || (currentState == OPTIONS_MENU && optionsReturnState != MAIN_MENU));
|
||||
|
||||
if (!inGame) {
|
||||
UpdateMusicStream(titleMusic);
|
||||
if (IsMusicStreamPlaying(gameplayMusic)) StopMusicStream(gameplayMusic);
|
||||
if (IsMusicStreamPlaying(nightMusic)) StopMusicStream(nightMusic);
|
||||
|
|
@ -883,7 +883,6 @@ int main(void)
|
|||
|
||||
// Handle crossfading based on state
|
||||
static float crossfade = 0.0f; // 0.0 = title, 1.0 = gameplay
|
||||
bool inGame = (currentState == GAMEPLAY || currentState == PAUSE_MENU || currentState == CRAFTING_GUI || (currentState == OPTIONS_MENU && optionsReturnState != MAIN_MENU));
|
||||
|
||||
if (inGame) {
|
||||
crossfade += 0.02f;
|
||||
|
|
@ -1528,7 +1527,7 @@ int main(void)
|
|||
|
||||
// Draw options panel
|
||||
int panelWidth = 600;
|
||||
int panelHeight = 400;
|
||||
int panelHeight = 480; // Increased from 400
|
||||
int panelX = (currentWidth / 2) - (panelWidth / 2);
|
||||
int panelY = (currentHeight / 2) - (panelHeight / 2);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue