Fixed CM.Options.TooltipBuildUpgrade #523
This commit is contained in:
13
src/Disp.js
13
src/Disp.js
@@ -1382,9 +1382,6 @@ CM.Disp.TooltipCreateWarningSection = function() {
|
||||
CM.Disp.UpdateTooltip = function() {
|
||||
CM.Sim.CopyData();
|
||||
if (l('tooltipAnchor').style.display != 'none' && l('CMTooltipArea')) {
|
||||
if (CM.Options.TooltipInfo == 0) {
|
||||
l('CMTooltipArea').style.display = "none";
|
||||
}
|
||||
l('CMTooltipArea').innerHTML = '';
|
||||
tooltipBox = CM.Disp.TooltipCreateTooltipBox();
|
||||
l('CMTooltipArea').appendChild(tooltipBox);
|
||||
@@ -1418,7 +1415,7 @@ CM.Disp.UpdateTooltip = function() {
|
||||
* It is called when Building tooltips are created or refreshed by CM.Disp.UpdateTooltip()
|
||||
*/
|
||||
CM.Disp.UpdateTooltipBuilding = function() {
|
||||
if (CM.Options.TooltipInfo == 1 && Game.buyMode == 1) {
|
||||
if (CM.Options.TooltipBuildUpgrade == 1 && Game.buyMode == 1) {
|
||||
tooltipBox = l('CMTooltipBorder');
|
||||
CM.Disp.TooltipCreateCalculationSection(tooltipBox);
|
||||
|
||||
@@ -1433,7 +1430,7 @@ CM.Disp.UpdateTooltipBuilding = function() {
|
||||
CM.Disp.TooltipBonusIncome = CM.Cache[target][CM.Disp.tooltipName].bonus;
|
||||
|
||||
|
||||
if (CM.Options.TooltipInfo == 1 && Game.buyMode == 1) {
|
||||
if (CM.Options.TooltipBuildUpgrade == 1 && Game.buyMode == 1) {
|
||||
l('CMTooltipIncome').textContent = Beautify(CM.Disp.TooltipBonusIncome, 2);
|
||||
var increase = Math.round(CM.Disp.TooltipBonusIncome / Game.cookiesPs * 10000);
|
||||
if (isFinite(increase) && increase != 0) {
|
||||
@@ -1469,6 +1466,7 @@ CM.Disp.UpdateTooltipBuilding = function() {
|
||||
l('CMTooltipTime').style.marginBottom = '0px';
|
||||
}
|
||||
}
|
||||
else l('CMTooltipArea').style.display = "none";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1483,7 +1481,7 @@ CM.Disp.UpdateTooltipUpgrade = function() {
|
||||
CM.Disp.TooltipPrice = Game.Upgrades[Game.UpgradesInStore[CM.Disp.tooltipName].name].getPrice();
|
||||
CM.Disp.TooltipBonusMouse = CM.Cache.Upgrades[Game.UpgradesInStore[CM.Disp.tooltipName].name].bonusMouse
|
||||
|
||||
if (CM.Options.TooltipInfo == 1) {
|
||||
if (CM.Options.TooltipBuildUpgrade == 1) {
|
||||
l('CMTooltipIncome').textContent = Beautify(CM.Disp.TooltipBonusIncome, 2);
|
||||
var increase = Math.round(CM.Disp.TooltipBonusIncome / Game.cookiesPs * 10000);
|
||||
if (isFinite(increase) && increase != 0) {
|
||||
@@ -1523,6 +1521,7 @@ CM.Disp.UpdateTooltipUpgrade = function() {
|
||||
l('CMTooltipBorder').appendChild(chocolate);
|
||||
}
|
||||
}
|
||||
else l('CMTooltipArea').style.display = "none";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1543,6 +1542,7 @@ CM.Disp.UpdateTooltipSugarLump = function() {
|
||||
lumpType.textContent = lumpColor.text;
|
||||
lumpType.className = CM.Disp.colorTextPre + lumpColor.color;
|
||||
}
|
||||
else l('CMTooltipArea').style.display = "none";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1598,6 +1598,7 @@ CM.Disp.UpdateTooltipGrimoire = function() {
|
||||
|
||||
l('CMTooltipArea').appendChild(tooltipBox);
|
||||
}
|
||||
else l('CMTooltipArea').style.display = "none";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user