1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-24 09:21:46 +00:00

Respec buttons and layer nodes don't keep focus

This commit is contained in:
Acamaeda 2020-12-06 23:40:06 -05:00
parent b623844316
commit bffa624ccc
2 changed files with 4 additions and 0 deletions

View file

@ -1,6 +1,8 @@
# The Modding Tree changelog: # The Modding Tree changelog:
- Added achievement/milestone popups (thank you to Jacorb for this contribution!)
- The changelog tab is back, and can be set in mod.js. - The changelog tab is back, and can be set in mod.js.
- Layer nodes and respec buttons are unselected after clicking them so you don't accidentally press them again with "enter".
- The victory screen text is configurable. - The victory screen text is configurable.
- Added an argument to use specific rows in an "upgrades" component. - Added an argument to use specific rows in an "upgrades" component.
- Added the ability to easily make a tab that is a collection of layers in subtabs. - Added the ability to easily make a tab that is a collection of layers in subtabs.

View file

@ -456,6 +456,7 @@ function respecBuyables(layer) {
if (!confirm("Are you sure you want to respec? This will force you to do a \"" + (tmp[layer].name ? tmp[layer].name : layer) + "\" reset as well!")) return if (!confirm("Are you sure you want to respec? This will force you to do a \"" + (tmp[layer].name ? tmp[layer].name : layer) + "\" reset as well!")) return
layers[layer].buyables.respec() layers[layer].buyables.respec()
updateBuyableTemp(layer) updateBuyableTemp(layer)
document.activeElement.blur()
} }
function canAffordUpgrade(layer, id) { function canAffordUpgrade(layer, id) {
@ -641,6 +642,7 @@ function showTab(name) {
if (player.navTab == "none" && (tmp[name].row !== "side") && (tmp[name].row !== "otherside")) player.lastSafeTab = name if (player.navTab == "none" && (tmp[name].row !== "side") && (tmp[name].row !== "otherside")) player.lastSafeTab = name
delete player.notify[name] delete player.notify[name]
needCanvasUpdate = true needCanvasUpdate = true
document.activeElement.blur()
} }
function showNavTab(name) { function showNavTab(name) {