mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Updated client with new config settings
This commit is contained in:
parent
5c5826921e
commit
cce945788d
2 changed files with 23 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ object SlayerTracker {
|
|||
const val textX = 7
|
||||
const val textY = 50
|
||||
const val spriteY = 30
|
||||
val boxColor = "635a38".toInt(16)
|
||||
val boxColor = GameConfig.slayerTrackerColor.toInt(16)
|
||||
|
||||
@JvmField
|
||||
var lastUpdate = 0L
|
||||
|
|
@ -32,7 +32,7 @@ object SlayerTracker {
|
|||
var amountPos = textX + 40
|
||||
if(rectWidth < 90) rectWidth = 90
|
||||
if(amountPos < textX + 60) amountPos = textX + 60
|
||||
tk.fillRect(posX,posY,rectWidth,30, boxColor,180)
|
||||
tk.fillRect(posX,posY,rectWidth,30, boxColor,GameConfig.slayerTrackerOpacity)
|
||||
|
||||
curSprite?.drawAt(textX, spriteY)
|
||||
RenderingUtils.drawText(GameConfig.slayerTaskAmount.toString(),amountPos, textY, -1, 2, false)
|
||||
|
|
|
|||
|
|
@ -128,6 +128,12 @@ class GameConfig {
|
|||
@JvmField
|
||||
var slayerCountEnabled = true
|
||||
|
||||
@JvmField
|
||||
var slayerTrackerColor = "#635a38"
|
||||
|
||||
@JvmField
|
||||
var slayerTrackerOpacity = 180
|
||||
|
||||
@JvmField
|
||||
var slayerTaskID = 0
|
||||
|
||||
|
|
@ -198,6 +204,21 @@ class GameConfig {
|
|||
if(style.containsKey("rs3border")) RS3_CONTEXT_STYLE = style["rs3border"] as Boolean
|
||||
}
|
||||
}
|
||||
|
||||
if(custom.containsKey("xpdrops")){
|
||||
val xpd = custom["xpdrops"] as JSONObject
|
||||
if(xpd.containsKey("enabled")) xpDropsEnabled = xpd["enabled"] as Boolean
|
||||
if(xpd.containsKey("drop_mode")) xpDropMode = xpd["drop_mode"].toString().toInt()
|
||||
if(xpd.containsKey("track_mode")) xpTrackMode = xpd["track_mode"].toString().toInt()
|
||||
}
|
||||
|
||||
if(custom.containsKey("slayer")){
|
||||
val slayer = custom["slayer"] as JSONObject
|
||||
if(slayer.containsKey("enabled")) slayerCountEnabled = slayer["enabled"] as Boolean
|
||||
if(slayer.containsKey("color")) slayerTrackerColor = slayer["color"].toString()
|
||||
if(slayer.containsKey("opacity")) slayerTrackerOpacity = slayer["opacity"].toString().toInt()
|
||||
}
|
||||
|
||||
if(custom.containsKey("rendering_options")) {
|
||||
val hdoptions = custom["rendering_options"] as JSONObject
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue