Skip to content

Commit 369aa50

Browse files
committed
Release v2.4.0
1 parent b67b88c commit 369aa50

4 files changed

Lines changed: 42 additions & 10 deletions

File tree

‎src/Components/ChartResize.luau‎

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,28 @@ function ChartResize:init()
2020

2121
local IconResizing = false
2222
local IsResizing = false
23+
local ResizeTarget = nil
24+
25+
local function IsResizeTargetVisible()
26+
local Current = ResizeTarget
27+
if not Current then
28+
return false
29+
end
30+
31+
while Current do
32+
if Current:IsA("GuiObject") and not Current.Visible then
33+
return false
34+
end
35+
36+
if Current:IsA("LayerCollector") and not Current.Enabled then
37+
return false
38+
end
39+
40+
Current = Current.Parent
41+
end
42+
43+
return true
44+
end
2345

2446
local DirectionIcons = {
2547
SizeWE = "rbxassetid://18699453492",
@@ -48,6 +70,7 @@ function ChartResize:init()
4870

4971
local EdgeSize = 8
5072
function self.SetSizeTarget(Rbx)
73+
ResizeTarget = Rbx
5174
if not Rbx then
5275
return
5376
end
@@ -58,6 +81,15 @@ function ChartResize:init()
5881
table.clear(self.Connections)
5982

6083
table.insert(self.Connections, RunService.RenderStepped:Connect(function()
84+
if not IsResizeTargetVisible() then
85+
if IsResizing then
86+
self.StopResizing()
87+
else
88+
self.RemoveIcon()
89+
end
90+
return
91+
end
92+
6193
local GUI_INSET = GuiService:GetGuiInset()
6294

6395
local Mouse = UserInputService:GetMouseLocation()
@@ -85,7 +117,7 @@ function ChartResize:init()
85117
end))
86118

87119
table.insert(self.Connections, UserInputService.InputBegan:Connect(function(Input)
88-
if Input.UserInputType == Enum.UserInputType.MouseButton1 and IconResizing then
120+
if Input.UserInputType == Enum.UserInputType.MouseButton1 and IconResizing and IsResizeTargetVisible() then
89121
self.StartResizing()
90122
end
91123
end))
@@ -110,7 +142,7 @@ function ChartResize:init()
110142
UpdateConnection = RunService.RenderStepped:Connect(function()
111143
local Delta = UserInputService:GetMouseLocation() - StartMousePosition
112144
if IconResizing == "SizeNS" then
113-
Delta *= Vector2.new(0, 1)
145+
Delta *= Vector2.new(0, 1)
114146
elseif IconResizing == "SizeWE" then
115147
Delta *= Vector2.new(1, 0)
116148
end
@@ -169,4 +201,4 @@ local function ChartResizeInit(PacketChart)
169201
})
170202
end
171203

172-
return ChartResizeInit
204+
return ChartResizeInit

‎src/Components/TopbarButton.luau‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ local TOPBAR_HEIGHT = 10
99
local function TopbarButton(props)
1010
return Roact.createElement("TextButton", {
1111
AutoLocalize = false,
12-
TextColor3 = props.Theme.Name == "Light" and Color3.new(0, 0, 0) or Color3.new(1, 1, 1),
12+
TextColor3 = props.Theme:GetColor("BrightText"),
1313
Size = UDim2.fromOffset(0, TOPBAR_HEIGHT),
1414
BackgroundColor3 = props.Theme:GetColor("Item"),
1515
TextSize = TOPBAR_HEIGHT + 1,
@@ -24,4 +24,4 @@ local function TopbarButton(props)
2424
})
2525
end
2626

27-
return TopbarButton
27+
return TopbarButton

‎src/Components/TopbarButtonsGroup.luau‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ local function TopbarOptionsButton(props)
1717
TextXAlignment = Enum.TextXAlignment.Right,
1818
TextYAlignment = Enum.TextYAlignment.Center,
1919
Font = Enum.Font.Code,
20-
TextColor3 = props.Theme.Name == "Light" and Color3.new(0, 0, 0) or Color3.new(1, 1, 1),
20+
TextColor3 = props.Theme:GetColor("BrightText"),
2121
TextSize = TOPBAR_HEIGHT + 2,
2222
BackgroundColor3 = props.Theme:GetColor("ScrollBarBackground"),
2323
Size = props.Size,
@@ -56,7 +56,7 @@ function TopbarButtonsGroup:render()
5656
return Roact.createElement("TextLabel", {
5757
AutoLocalize = false,
5858
Text = props.Text,
59-
TextColor3 = props.Theme.Name == "Light" and Color3.new(0, 0, 0) or Color3.new(1, 1, 1),
59+
TextColor3 = props.Theme:GetColor("BrightText"),
6060
BackgroundColor3 = self.MouseHovering:map(function(VisibleIndex)
6161
return VisibleIndex > 0 and props.Theme:GetColor("Light") or props.Theme:GetColor("ScrollBarBackground")
6262
end),
@@ -109,4 +109,4 @@ function TopbarButtonsGroup:render()
109109
})
110110
end
111111

112-
return TopbarButtonsGroup
112+
return TopbarButtonsGroup

‎wally.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyseph/packetprofiler"
3-
version = "2.3.0"
3+
version = "2.4.0"
44
registry = "https://github.com/UpliftGames/wally-index"
55
realm = "shared"
66
description = "Remote packet profiler"
@@ -9,4 +9,4 @@ license = "MIT"
99
[dependencies]
1010
Roact = "pysephwasntavailable/roact-constant-fork@1.5.0"
1111
PacketSizeCounter = "pysephwasntavailable/remotepacketsizecounter@2.4.1"
12-
Signal = "stravant/goodsignal@0.2.1"
12+
Signal = "stravant/goodsignal@0.2.1"

0 commit comments

Comments
 (0)