From 47437ce4966e4941d986cb3b8a5e61bdd30b25c8 Mon Sep 17 00:00:00 2001 From: Aktanusa Date: Sat, 26 Dec 2015 21:30:52 -0500 Subject: [PATCH] Update beta JS with 1 fix --- CookieMonsterBeta.js | 56 ++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/CookieMonsterBeta.js b/CookieMonsterBeta.js index edd8463..cfb48a4 100644 --- a/CookieMonsterBeta.js +++ b/CookieMonsterBeta.js @@ -755,29 +755,19 @@ CM.Disp.UpdateTimerBar = function() { } CM.Disp.UpdateBotTimerBarDisplay = function() { - if (Game.OnAscend) { - l('game').style.bottom = '0px'; - CM.Disp.BotBar.style.display = 'none'; - CM.Disp.TimerBar.style.display = 'none'; - CM.Disp.GCTimer.style.display = 'none'; + if (CM.Config.BotBar == 1 && CM.Config.TimerBar == 1 && CM.Config.TimerBarPos == 1) { + CM.Disp.BotBar.style.bottom = '48px'; + l('game').style.bottom = '104px'; } - else { - CM.Disp.BotBar.style.display = ''; - CM.Disp.TimerBar.style.display = ''; - if (CM.Config.BotBar == 1 && CM.Config.TimerBar == 1 && CM.Config.TimerBarPos == 1) { - CM.Disp.BotBar.style.bottom = '48px'; - l('game').style.bottom = '104px'; - } - else if (CM.Config.BotBar == 1) { - CM.Disp.BotBar.style.bottom = '0px'; - l('game').style.bottom = '56px'; - } - else if (CM.Config.TimerBar == 1 && CM.Config.TimerBarPos == 1) { - l('game').style.bottom = '48px'; - } - else { // No bars - l('game').style.bottom = '0px'; - } + else if (CM.Config.BotBar == 1) { + CM.Disp.BotBar.style.bottom = '0px'; + l('game').style.bottom = '56px'; + } + else if (CM.Config.TimerBar == 1 && CM.Config.TimerBarPos == 1) { + l('game').style.bottom = '48px'; + } + else { // No bars + l('game').style.bottom = '0px'; } if (CM.Config.TimerBar == 1 && CM.Config.TimerBarPos == 0) { @@ -1910,6 +1900,20 @@ CM.Disp.UpdateWrinklerTooltip = function() { } } +CM.Disp.UpdateAscendState = function() { + if (Game.OnAscend) { + l('game').style.bottom = '0px'; + if (CM.Config.BotBar == 1) CM.Disp.BotBar.style.display = 'none'; + if (CM.Config.TimerBar == 1) CM.Disp.TimerBar.style.display = 'none'; + } + else { + CM.Disp.ToggleBotBar(); + CM.Disp.ToggleTimerBar(); + } + + CM.Disp.UpdateBackground(); +} + CM.Disp.ToggleSayTime = function() { if (CM.Config.SayTime == 1) { Game.sayTime = CM.Disp.sayTime; @@ -2029,7 +2033,7 @@ CM.ReplaceNative = function() { CM.Loop = function() { if (CM.Disp.lastAscendState != Game.OnAscend) { CM.Disp.lastAscendState = Game.OnAscend; - CM.Disp.UpdateBotTimerBarDisplay(); + CM.Disp.UpdateAscendState(); } if (!Game.OnAscend && Game.AscendTimer == 0) { if (CM.Sim.DoSims) { @@ -2058,15 +2062,15 @@ CM.Loop = function() { CM.Disp.CheckWrinklerTooltip(); CM.Disp.UpdateWrinklerTooltip(); - // Check Golden Cookies - CM.Disp.CheckGoldenCookie(); - // Update Title CM.Disp.UpdateTitle(); // Change menu refresh interval CM.Disp.RefreshMenu(); } + + // Check Golden Cookies + CM.Disp.CheckGoldenCookie(); } CM.Init = function() {