Fixed issue #14 (tooltip is cut off at bottom)

This commit is contained in:
Aktanusa
2014-07-14 09:50:27 -04:00
parent ee1545fca0
commit ccc01ab5dc
3 changed files with 20 additions and 18 deletions

View File

@@ -1044,6 +1044,14 @@ CM.Disp.RefreshMenu = function() {
if (CM.Config.UpStats && Game.onMenu == 'stats' && Game.drawT % (Game.fps * 3) != 0 && Game.drawT % Game.fps == 0) Game.UpdateMenu();
}
CM.Disp.UpdateTooltipLocation = function() {
Game.tooltip.tta.style.top = Math.max(0, Math.min((l('game').clientHeight + l('topBar').clientHeight) - Game.tooltip.tt.clientHeight - CM.Disp.TooltipWarnCaut.clientHeight - 64, Game.mouseY - 48)) + 'px';
if (Game.tooltip.origin == 'wrink') {
Game.tooltip.tta.style.left = (Game.mouseX + l('tooltip').offsetWidth + 25) + 'px';
Game.tooltip.tta.style.right = 'auto';
}
}
CM.Disp.CreateTooltipWarnCaut = function() {
CM.Disp.TooltipWarnCaut = document.createElement('div');
CM.Disp.TooltipWarnCaut.style.position = 'absolute';
@@ -1360,13 +1368,6 @@ CM.Disp.UpdateWrinklerTooltip = function() {
}
}
CM.Disp.UpdateTooltipWrinklerLocation = function() {
if (Game.tooltip.origin == 'wrink') {
Game.tooltip.tta.style.left = (Game.mouseX + l('tooltip').offsetWidth + 25) + 'px';
Game.tooltip.tta.style.right = 'auto';
}
}
CM.Disp.ToggleSayTime = function() {
if (CM.Config.SayTime == 1) {
Game.sayTime = CM.Disp.sayTime;