Added v1.2 - Made the drop table editor more space efficient, select config folder button now locks after used

This commit is contained in:
ceikry 2021-07-16 17:23:11 -05:00
parent bdc00c717b
commit b58f60aeea
3 changed files with 7 additions and 9 deletions

View file

@ -3,7 +3,7 @@ plugins {
}
group 'org.example'
version '1.0-SNAPSHOT'
version '1.2'
repositories {
repositories {

View file

@ -1,5 +1,6 @@
import java.awt.BorderLayout
import java.awt.Dimension
import java.awt.FlowLayout
import java.awt.event.*
import java.math.BigDecimal
import java.math.RoundingMode
@ -270,9 +271,6 @@ class DropTableEditor(val table: NPCDropTable) : JFrame("Editing ${if(table.ids.
class Subtable(val label: String, val pane: JScrollPane, val table: WeightBasedTable, val model: DefaultTableModel) : JFrame("Editing $label Drops"){
init {
layout = BorderLayout()
val panel = JPanel()
panel.layout = BorderLayout()
val topPanel = JPanel()
val mainLabel = JLabel("$label Drops")
@ -295,11 +293,8 @@ class DropTableEditor(val table: NPCDropTable) : JFrame("Editing ${if(table.ids.
ItemMenu.open()
}
topPanel.add(addButton)
panel.add(topPanel,BorderLayout.NORTH)
panel.add(pane,BorderLayout.SOUTH)
add(panel)
add(topPanel, BorderLayout.NORTH)
add(pane, BorderLayout.CENTER)
pack()
minimumSize = Dimension(width + 40,height + 50)
isVisible = false

View file

@ -50,6 +50,9 @@ object MainScreen : JFrame("RS09 Thanos Tool") {
if(response == JFileChooser.APPROVE_OPTION){
Logger.logInfo("Selected directory: ${dirChooser.selectedFile.absolutePath}")
EditorConstants.CONFIG_PATH = dirChooser.selectedFile.absolutePath
if(loadedModel.rowCount > 0) {
selectDir.isEnabled = false
}
showLoaded()
}
}