Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use window created by context menu for view requests #3213

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions lua/wire/client/e2_viewrequest_menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,17 @@
title = "View Requests",
icon = "beer/wiremod/gate_e2", -- Use whatever icon you want here, I just picked my favourite out of the available E2 ones
init = function(icon, window)
local container = vgui.Create("DFrame")
container:SetTitle("Expression 2 View Requests")
window:SetTitle("Expression 2 View Requests")

container:SetSize(ScrW() * 0.3, ScrH() * 0.6)
container:SetSizable(true)
container:SetMinWidth(ScrW() * 0.1)
container:SetMinHeight(ScrH() * 0.2)
window:SetSize(ScrW() * 0.3, ScrH() * 0.6)
window:SetSizable(true)
window:SetMinWidth(ScrW() * 0.1)
window:SetMinHeight(ScrH() * 0.2)

container:Center()
container:MakePopup()
window:Center()
window:MakePopup()

local reqList = vgui.Create("DListView", container)
local reqList = vgui.Create("DListView", window)
reqList:Dock(FILL)
reqList:SetMultiSelect(false)

Expand Down Expand Up @@ -99,7 +98,7 @@
end

mnu:AddOption("Accept Once", function()
local confirm = Derma_Query(

Check warning on line 101 in lua/wire/client/e2_viewrequest_menu.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: confirm
"Are you SURE you want "..line.initiator:Nick().." to have complete access to the code in your chip '"..viewRequests[line.initiator][line.chip].name.."'?\nThis means they are able to steal and redistribute it, so you should only do this if you are certain you can trust them",
"Confirm",
"Yes", function()
Expand All @@ -113,7 +112,7 @@
)
end)
mnu:AddOption("Accept Always", function()
local confirm = Derma_Query(

Check warning on line 115 in lua/wire/client/e2_viewrequest_menu.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: confirm
"Are you SURE you want "..line.initiator:Nick().." to have complete access to the code in your chip '"..viewRequests[line.initiator][line.chip].name.."' for the duration the chip entity exists?\nThis means they are able to steal and redistribute it, as well as view any modifications you make to the chip, so you should only do this if you are certain you can trust them",
"Confirm",
"Yes", function()
Expand Down
Loading