Fix simple tooltips #687
This commit is contained in:
File diff suppressed because one or more lines are too long
2
dist/CookieMonster.js
vendored
2
dist/CookieMonster.js
vendored
File diff suppressed because one or more lines are too long
2
dist/CookieMonster.js.map
vendored
2
dist/CookieMonster.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { ToggleHeader } from '../../Config/ToggleSetting';
|
import { ToggleHeader } from '../../Config/ToggleSetting';
|
||||||
import { CMOptions } from '../../Config/VariablesAndData';
|
import { CMOptions } from '../../Config/VariablesAndData';
|
||||||
import { TooltipText } from '../VariablesAndData';
|
import { SimpleTooltipElements } from '../VariablesAndData';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function creates a header-object for the stats page
|
* This function creates a header-object for the stats page
|
||||||
@@ -64,7 +64,10 @@ export function StatsListing(type, name, text, placeholder) {
|
|||||||
Game.tooltip.hide();
|
Game.tooltip.hide();
|
||||||
};
|
};
|
||||||
tooltip.onmouseover = function () {
|
tooltip.onmouseover = function () {
|
||||||
Game.tooltip.draw(this, escape(TooltipText[placeholder].innerHTML));
|
Game.tooltip.draw(
|
||||||
|
this,
|
||||||
|
escape(SimpleTooltipElements[placeholder].innerHTML),
|
||||||
|
);
|
||||||
};
|
};
|
||||||
tooltip.style.cursor = 'default';
|
tooltip.style.cursor = 'default';
|
||||||
tooltip.style.display = 'inline-block';
|
tooltip.style.display = 'inline-block';
|
||||||
|
|||||||
@@ -6,7 +6,11 @@ import {
|
|||||||
GetTimeColor,
|
GetTimeColor,
|
||||||
} from '../BeautifyAndFormatting/BeautifyFormatting';
|
} from '../BeautifyAndFormatting/BeautifyFormatting';
|
||||||
import CopyData from '../../Sim/SimulationData/CopyData';
|
import CopyData from '../../Sim/SimulationData/CopyData';
|
||||||
import { TooltipName, TooltipType } from '../VariablesAndData';
|
import {
|
||||||
|
SimpleTooltipElements,
|
||||||
|
TooltipName,
|
||||||
|
TooltipType,
|
||||||
|
} from '../VariablesAndData';
|
||||||
import { CMOptions } from '../../Config/VariablesAndData';
|
import { CMOptions } from '../../Config/VariablesAndData';
|
||||||
import BuildingGetPrice from '../../Sim/SimulationEvents/BuyBuilding';
|
import BuildingGetPrice from '../../Sim/SimulationEvents/BuyBuilding';
|
||||||
|
|
||||||
@@ -30,6 +34,7 @@ export function CreateSimpleTooltip(placeholder, text, minWidth) {
|
|||||||
div.textContent = text;
|
div.textContent = text;
|
||||||
desc.appendChild(div);
|
desc.appendChild(div);
|
||||||
Tooltip.appendChild(desc);
|
Tooltip.appendChild(desc);
|
||||||
|
SimpleTooltipElements[placeholder] = Tooltip;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ export const TooltipText = [
|
|||||||
'250px',
|
'250px',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
export const SimpleTooltipElements = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These are variables used by the functions that create tooltips for wrinklers
|
* These are variables used by the functions that create tooltips for wrinklers
|
||||||
|
|||||||
Reference in New Issue
Block a user