Add stock market tooltip info (#1189)
* Add info to stock market tooltips * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add up and down arrows to expected value --------- Co-authored-by: srs42006 <45675882+srs42006@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -58,6 +58,21 @@ function ReplaceTooltipGarden() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function replaces the original .onmouseover functions of all stocks
|
||||
*/
|
||||
function ReplaceTooltipMarket() {
|
||||
if (Game.Objects.Bank.minigameLoaded) {
|
||||
for (let i = 0; i < Game.Objects.Bank.minigame.goodsById.length; i++) {
|
||||
l(`bankGood-${i}`).firstChild.onmouseover = function () {
|
||||
Game.tooltip.dynamic = 1;
|
||||
Game.tooltip.draw(this, () => CreateTooltip('sm', i), 'this');
|
||||
Game.tooltip.wobble();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ReplaceTooltipPantheon() {
|
||||
if (Game.Objects.Temple.minigameLoaded) {
|
||||
for (let i = 0; i < 11; i += 1) {
|
||||
@@ -96,6 +111,7 @@ export default function ReplaceTooltips() {
|
||||
LoadMinigames();
|
||||
ReplaceTooltipGarden();
|
||||
ReplaceTooltipGrimoire();
|
||||
ReplaceTooltipMarket();
|
||||
ReplaceTooltipPantheon();
|
||||
ReplaceNativeGrimoire();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user