Tooltip for harvest all button #227

This commit is contained in:
Daniel van Noord
2021-01-27 22:12:37 +01:00
parent 5abdc77e30
commit 6c852e2c50
3 changed files with 94 additions and 2 deletions

View File

@@ -330,6 +330,7 @@ CM.Main.ReplaceTooltipLump = function() {
*/
CM.Main.ReplaceTooltipGarden = function() {
if (Game.Objects['Farm'].minigameLoaded) {
l('gardenTool-1').onmouseover = function() {Game.tooltip.dynamic=1; Game.tooltip.draw(this, function() {return CM.Disp.Tooltip('ha', 'HarvestAllButton');}, 'this'); Game.tooltip.wobble();}
Array.from(l('gardenPlot').children).forEach((child, index) => {
var coords = child.id.slice(-3,);
child.onmouseover = function() {Game.tooltip.dynamic=1; Game.tooltip.draw(this, function() {return CM.Disp.Tooltip('p', [`${coords[0]}`,`${coords[2]}`]);}, 'this'); Game.tooltip.wobble();};