diff --git a/SharkPlanner/UI/CrosshairWindow.dlg b/SharkPlanner/UI/CrosshairWindow.dlg index db5996a..012e188 100644 --- a/SharkPlanner/UI/CrosshairWindow.dlg +++ b/SharkPlanner/UI/CrosshairWindow.dlg @@ -85,6 +85,28 @@ dialog = { }, ["type"] = "Static", }, + ["ObjectID"] = { + ["params"] = { + ["bounds"] = { + ["x"] = 400 - 150, + ["y"] = 200 + 13, + ["h"] = 26, + ["w"] = 150, + }, + ["enabled"] = false, + ["text"] = "", + ["tooltip"] = "Distance from last waypoint", + ["visible"] = true, + ["zindex"] = 0, + }, + ["skin"] = { + -- ["params"] = { + -- ["name"] = "buttonSkinAwacs", + -- -- ["name"] = "staticSkin_ME", + -- }, + }, + ["type"] = "Static", + }, ["DistanceFromLast"] = { ["params"] = { ["bounds"] = { diff --git a/SharkPlanner/UI/CrosshairWindow.lua b/SharkPlanner/UI/CrosshairWindow.lua index dd83f79..e67fbe4 100644 --- a/SharkPlanner/UI/CrosshairWindow.lua +++ b/SharkPlanner/UI/CrosshairWindow.lua @@ -12,6 +12,7 @@ local Camera = require("SharkPlanner.Base.Camera") local Position = require("SharkPlanner.Base.Position") local Mathematics = require("SharkPlanner.Mathematics") local SkinHelper = require("SharkPlanner.UI.SkinHelper") +local JSON = require("JSON") local CrosshairWindow = DialogLoader.spawnDialogFromFile( lfs.writedir() .. "Scripts\\SharkPlanner\\UI\\CrosshairWindow.dlg" @@ -31,6 +32,7 @@ function CrosshairWindow:new(o) local staticCrosshairValueSkin = SkinHelper.loadSkin('staticCrosshairRightLightValue') local staticCrosshairLightValueSkin = SkinHelper.loadSkin('staticCrosshairRightLightValue') o.ObjectModel:setSkin(staticCrosshairLightValueSkin) + o.ObjectID:setSkin(staticCrosshairLightValueSkin) o.DistanceFromLast:setSkin(staticCrosshairValueSkin) o.Longitude:setSkin(staticCrosshairValueSkin) o.Latitude:setSkin(staticCrosshairValueSkin) @@ -93,8 +95,11 @@ end function CrosshairWindow:updateObjectModel(eventArgs) if #eventArgs.objects > 0 then self.ObjectModel:setText(eventArgs.objects[1].model) + self.ObjectID:setText(eventArgs.objects[1].id) + Logging.debug("Object: "..JSON:encode_pretty(eventArgs.objects[1])) else self.ObjectModel:setText("") + self.ObjectID:setText("") end end