Fixed bar display glitches related to ascend changes
This commit is contained in:
48
src/Disp.js
48
src/Disp.js
@@ -417,29 +417,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) {
|
||||
@@ -1572,6 +1562,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;
|
||||
|
||||
@@ -67,7 +67,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) {
|
||||
@@ -96,15 +96,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() {
|
||||
|
||||
Reference in New Issue
Block a user