Skip to content

Commit

Permalink
Remove infobutton. Not ready for the world.
Browse files Browse the repository at this point in the history
  • Loading branch information
zonkmachine committed Jul 10, 2023
1 parent 5d1c7bd commit f509616
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
1 change: 0 additions & 1 deletion data/modules/CargoRun/CargoRun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion data/modules/DeliverPackage/DeliverPackage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 0 additions & 17 deletions data/pigui/libs/chat-form.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f509616

Please sign in to comment.