Fix simple tooltips #687
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { ToggleHeader } from '../../Config/ToggleSetting';
|
||||
import { CMOptions } from '../../Config/VariablesAndData';
|
||||
import { TooltipText } from '../VariablesAndData';
|
||||
import { SimpleTooltipElements } from '../VariablesAndData';
|
||||
|
||||
/**
|
||||
* This function creates a header-object for the stats page
|
||||
@@ -64,7 +64,10 @@ export function StatsListing(type, name, text, placeholder) {
|
||||
Game.tooltip.hide();
|
||||
};
|
||||
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.display = 'inline-block';
|
||||
|
||||
@@ -6,7 +6,11 @@ import {
|
||||
GetTimeColor,
|
||||
} from '../BeautifyAndFormatting/BeautifyFormatting';
|
||||
import CopyData from '../../Sim/SimulationData/CopyData';
|
||||
import { TooltipName, TooltipType } from '../VariablesAndData';
|
||||
import {
|
||||
SimpleTooltipElements,
|
||||
TooltipName,
|
||||
TooltipType,
|
||||
} from '../VariablesAndData';
|
||||
import { CMOptions } from '../../Config/VariablesAndData';
|
||||
import BuildingGetPrice from '../../Sim/SimulationEvents/BuyBuilding';
|
||||
|
||||
@@ -30,6 +34,7 @@ export function CreateSimpleTooltip(placeholder, text, minWidth) {
|
||||
div.textContent = text;
|
||||
desc.appendChild(div);
|
||||
Tooltip.appendChild(desc);
|
||||
SimpleTooltipElements[placeholder] = Tooltip;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -80,6 +80,7 @@ export const TooltipText = [
|
||||
'250px',
|
||||
],
|
||||
];
|
||||
export const SimpleTooltipElements = {};
|
||||
|
||||
/**
|
||||
* These are variables used by the functions that create tooltips for wrinklers
|
||||
|
||||
Reference in New Issue
Block a user