From f509616b79cb04657ddb86630cac5cf613de3b44 Mon Sep 17 00:00:00 2001 From: Oskar Wallgren Date: Mon, 10 Jul 2023 16:26:44 +0200 Subject: [PATCH] Remove infobutton. Not ready for the world. --- data/modules/CargoRun/CargoRun.lua | 1 - data/modules/DeliverPackage/DeliverPackage.lua | 1 - data/pigui/libs/chat-form.lua | 17 ----------------- 3 files changed, 19 deletions(-) diff --git a/data/modules/CargoRun/CargoRun.lua b/data/modules/CargoRun/CargoRun.lua index c913fcd5c6a..1a317645455 100644 --- a/data/modules/CargoRun/CargoRun.lua +++ b/data/modules/CargoRun/CargoRun.lua @@ -138,7 +138,6 @@ onChat = function (form, ref, option) end end - form:AddInfoButton(ad.location:GetSystemBody().parent) form:AddNavButton(ad.location) if ad.negotiated_amount == nil then diff --git a/data/modules/DeliverPackage/DeliverPackage.lua b/data/modules/DeliverPackage/DeliverPackage.lua index 02d9927fd5a..8be13c0924a 100644 --- a/data/modules/DeliverPackage/DeliverPackage.lua +++ b/data/modules/DeliverPackage/DeliverPackage.lua @@ -151,7 +151,6 @@ local onChat = function (form, ref, option) return end - form:AddInfoButton(ad.location:GetSystemBody().parent) form:AddNavButton(ad.location) if option == 0 then diff --git a/data/pigui/libs/chat-form.lua b/data/pigui/libs/chat-form.lua index afdc23a7e31..e3a3cd0f720 100644 --- a/data/pigui/libs/chat-form.lua +++ b/data/pigui/libs/chat-form.lua @@ -34,7 +34,6 @@ function ChatForm.New (chatFunc, removeFunc, closeFunc, resizeFunc, ref, tabGrou ref = ref, tabGroup = tabGroup, market = nil, - infoButton = function() end, navButton = function() end, style = { face = { @@ -106,7 +105,6 @@ function ChatForm:render () self.market:Render(self.style.marketSize) end - self.infoButton() self.navButton() if ui.button(l.HANG_UP, self.style.buttonSize) or ui.escapeKeyReleased(true) then @@ -166,21 +164,6 @@ function ChatForm:AddGoodsTrader (funcs) self.market:Refresh() end -function ChatForm:AddInfoButton (target) - self.infoButton = function() - if ui.button("Show target info", self.style.buttonSize) then - self:SetMessage(target.name .. "\n" .. - "Surface gravity: " .. string.format("%.2f", target.gravity / 9.8066) .. " g \n" .. - "Escape velocity: " .. string.format("%.2f", target.escapeVelocity / 1000) .. " km/s" .. "\n" .. - "Mean density: " .. string.format("%.2f", target.meanDensity / 1000) .. " t/m3") - end - end -end - -function ChatForm:RemoveInfoButton () - self.infoButton = function() end -end - function ChatForm:AddNavButton (target) self.navButton = function() if ui.button(l.SET_AS_TARGET, self.style.buttonSize) then