diff --git a/src/ipc/main-process-bindings.ts b/src/ipc/main-process-bindings.ts
index 350748f8..02f2fb82 100644
--- a/src/ipc/main-process-bindings.ts
+++ b/src/ipc/main-process-bindings.ts
@@ -16,6 +16,12 @@ class MainProcessBinding extends EventTarget {
this.selfEmitPriceCheck(data)
})
+ electron.ipcRenderer.on(ipcEvent.MAP_CHECK, (e, data) => {
+ this.dispatchEvent(new CustomEvent(ipcEvent.MAP_CHECK, {
+ detail: data
+ }))
+ })
+
electron.ipcRenderer.on(ipcEvent.LEAGUE_SELECTED, (e, leagueId) => {
this.dispatchEvent(new CustomEvent(ipcEvent.LEAGUE_SELECTED, {
detail: leagueId
diff --git a/src/ipc/types.ts b/src/ipc/types.ts
index 6d864653..bf5a334a 100644
--- a/src/ipc/types.ts
+++ b/src/ipc/types.ts
@@ -112,7 +112,22 @@ export const defaultConfig: Config = {
wmZorder: 3,
wmFlags: ['hide-on-blur', 'skip-menu'],
selectedStats: [
- // { text: '' }
+ {
+ text: 'Slaying Enemies close together has a #% chance to attract monsters from Beyond',
+ markedAs: 'desirable'
+ },
+ {
+ text: '#% maximum Player Resistances',
+ markedAs: 'warning'
+ },
+ {
+ text: 'Monsters reflect #% of Physical Damage',
+ markedAs: 'danger'
+ },
+ {
+ text: 'Area contains two Unique Bosses',
+ markedAs: 'desirable'
+ }
]
},
// --- DEFAULT ---
diff --git a/src/web/map-check/MapStatButton.vue b/src/web/map-check/MapStatButton.vue
new file mode 100644
index 00000000..497647cd
--- /dev/null
+++ b/src/web/map-check/MapStatButton.vue
@@ -0,0 +1,68 @@
+
+
+
+
+
diff --git a/src/web/map-check/WidgetMapCheck.vue b/src/web/map-check/WidgetMapCheck.vue
new file mode 100644
index 00000000..9666a407
--- /dev/null
+++ b/src/web/map-check/WidgetMapCheck.vue
@@ -0,0 +1,92 @@
+
+
+
+
{{ mapName }}
+
+ Item under cursor is not a map.
+
+
+
+
+
+ Preview Version More features and configuration options to come in the next release
+
+
+
+
+
+
diff --git a/src/web/map-check/prepare-map-stats.ts b/src/web/map-check/prepare-map-stats.ts
new file mode 100644
index 00000000..f6767492
--- /dev/null
+++ b/src/web/map-check/prepare-map-stats.ts
@@ -0,0 +1,26 @@
+import { ParsedItem } from '@/parser/ParsedItem'
+import { getRollAsSingleNumber } from '@/parser/utils'
+
+type PreparedStat = {
+ text: string
+ ref: string
+ roll?: number
+}
+
+export function prepareMapStats (item: ParsedItem): PreparedStat[] {
+ return item.modifiers.map(mod => {
+ const prepared = {
+ text: mod.string,
+ ref: mod.stat.ref,
+ roll: mod.values && getRollAsSingleNumber(mod.values)
+ }
+
+ if (mod.negate) {
+ if (prepared.roll != null) {
+ prepared.roll = -1 * prepared.roll
+ }
+ }
+
+ return prepared
+ })
+}
diff --git a/src/web/overlay/OverlayWindow.vue b/src/web/overlay/OverlayWindow.vue
index 7b5492d8..aaafa659 100644
--- a/src/web/overlay/OverlayWindow.vue
+++ b/src/web/overlay/OverlayWindow.vue
@@ -44,7 +44,9 @@ export default {
active: false,
gameFocused: false,
hideUI: false,
- devicePixelRatio: null
+ devicePixelRatio: null,
+ width: window.innerWidth,
+ height: window.innerHeight
}
},
watch: {
@@ -98,8 +100,10 @@ export default {
})
window.addEventListener('resize', () => {
this.devicePixelRatio = window.devicePixelRatio
+ this.width = window.innerWidth
+ this.height = window.innerHeight
})
- this.devicePixelRatio = window.devicePixelRatio
+ this.devicePixelRatio = window.devicePixelRatio // trigger watcher
},
mounted () {
this.$nextTick(() => {
@@ -134,6 +138,11 @@ export default {
return this.widgets
.filter(w => w.wmZorder !== 'exclusive')
.sort((a, b) => b.wmZorder - a.wmZorder)[0] // guaranteed to always exist because of the 'widget-menu'
+ },
+ poeUiWidth () {
+ // sidebar is 370px at 800x600
+ const ratio = 370 / 600
+ return Math.round(this.height * ratio)
}
},
methods: {
diff --git a/src/web/overlay/Widget.vue b/src/web/overlay/Widget.vue
index 4f1138db..c7c42308 100644
--- a/src/web/overlay/Widget.vue
+++ b/src/web/overlay/Widget.vue
@@ -10,7 +10,7 @@
:class="$style.action">hide
-
diff --git a/src/web/price-check/PriceCheckWindow.vue b/src/web/price-check/PriceCheckWindow.vue
index 2504d45c..0cb76a85 100644
--- a/src/web/price-check/PriceCheckWindow.vue
+++ b/src/web/price-check/PriceCheckWindow.vue
@@ -6,7 +6,7 @@
'flex-row-reverse': clickPosition === 'inventory',
}">
+ :style="{ width: `${wm.poeUiWidth}px` }">
@@ -110,15 +110,12 @@ export default {
MainProcess.addEventListener(PRICE_CHECK_CANCELED, () => {
this.wm.hide(this.config.wmId)
})
- window.addEventListener('resize', this.updatePoeUiWidth)
- this.updatePoeUiWidth()
},
data () {
this.config.wmWants = 'hide'
this.config.wmFlags = ['hide-on-blur', 'skip-menu']
return {
- poeUiWidth: '1px',
checkPosition: { x: 1, y: 1 },
item: null,
showTips: false
@@ -179,11 +176,6 @@ export default {
methods: {
closePriceCheck () {
MainProcess.closeOverlay()
- },
- updatePoeUiWidth () {
- // sidebar is 370px at 800x600
- const ratio = 370 / 600
- this.poeUiWidth = `${Math.round(window.innerHeight * ratio)}px`
}
}
}
diff --git a/src/web/price-check/filters/FilterModifier.vue b/src/web/price-check/filters/FilterModifier.vue
index 34ebb2e4..e52c9393 100644
--- a/src/web/price-check/filters/FilterModifier.vue
+++ b/src/web/price-check/filters/FilterModifier.vue
@@ -7,8 +7,8 @@
'fas fa-check-square': !filter.disabled
}">
-
-
+
+
@@ -76,10 +76,10 @@
diff --git a/src/web/price-check/filters/FilteStatText.vue b/src/web/ui/ItemModifierText.vue
similarity index 74%
rename from src/web/price-check/filters/FilteStatText.vue
rename to src/web/ui/ItemModifierText.vue
index d63be633..3273684c 100644
--- a/src/web/price-check/filters/FilteStatText.vue
+++ b/src/web/ui/ItemModifierText.vue
@@ -12,24 +12,28 @@