mirror of
https://gitlab.com/2009scape/tools/rs09-thanos-tool.git
synced 2026-08-01 14:39:20 -06:00
Fixed a coordinate issue with new item spawns
This commit is contained in:
parent
f8a80f34b8
commit
7dbe904ce7
2 changed files with 11 additions and 5 deletions
|
|
@ -73,6 +73,15 @@ class ItemSpawnPanel : JPanel() {
|
|||
preferredSize = Dimension(300, 68)
|
||||
maximumSize = Dimension(300, 68)
|
||||
|
||||
Rs2MapEditor.itemIdInput.addMouseListener (object : MouseAdapter() {
|
||||
override fun mouseClicked (e: MouseEvent) {
|
||||
ItemMenu.caller = {id, name ->
|
||||
Rs2MapEditor.itemIdInput.text = id.toString()
|
||||
}
|
||||
ItemMenu.open()
|
||||
}
|
||||
})
|
||||
|
||||
layout = BorderLayout()
|
||||
topPanel.add(Rs2MapEditor.itemIdInput)
|
||||
topPanel.add(addButton)
|
||||
|
|
|
|||
|
|
@ -119,13 +119,10 @@ class MapCell : JPanel() {
|
|||
return
|
||||
}
|
||||
|
||||
val absolute = Util.getAbsoluteCoordinates(Rs2MapEditor.region, Rs2MapEditor.selectedPointX, Rs2MapEditor.selectedPointY, Rs2MapEditor.plane)
|
||||
val item = TableData.ItemSpawn(
|
||||
id,
|
||||
TableData.Location(
|
||||
Rs2MapEditor.selectedPointX,
|
||||
Rs2MapEditor.selectedPointY,
|
||||
Rs2MapEditor.plane
|
||||
),
|
||||
absolute,
|
||||
amount,
|
||||
respawnTime
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue