@@ -32,7 +32,8 @@ return function(Config)
3232 Closed = false ,
3333 HasOutline = Config .HasOutline or false ,
3434 SuperParent = Config .Parent ,
35- Destroyed = false
35+ Destroyed = false ,
36+ IsFullscreen = false
3637 }
3738
3839 if Window .Folder then
@@ -269,6 +270,19 @@ return function(Config)
269270 Position = UDim2 .new (0.5 ,0 ,0.5 ,0 ),
270271 })
271272
273+ local FullscreenButton = New (" ImageButton" , {
274+ Image = Creator .Icon (" square" )[1 ],
275+ ImageRectOffset = Creator .Icon (" square" )[2 ].ImageRectPosition ,
276+ ImageRectSize = Creator .Icon (" square" )[2 ].ImageRectSize ,
277+ BackgroundTransparency = 1 ,
278+ Size = UDim2 .new (1 ,- 6 ,1 ,- 6 ),
279+ ThemeTag = {
280+ ImageColor3 = " Text"
281+ },
282+ AnchorPoint = Vector2 .new (0.5 ,0.5 ),
283+ Position = UDim2 .new (0.5 ,0 ,0.5 ,0 ),
284+ })
285+
272286 local MinimizeButton = New (" ImageButton" , {
273287 Image = Creator .Icon (" minus" )[1 ],
274288 ImageRectOffset = Creator .Icon (" minus" )[2 ].ImageRectPosition ,
@@ -573,14 +587,21 @@ return function(Config)
573587 New (" TextButton" , {
574588 Size = UDim2 .new (0 ,24 ,0 ,24 ),
575589 BackgroundTransparency = 1 ,
576- LayoutOrder = 1 ,
590+ LayoutOrder = 3 ,
577591 }, {
578592 CloseButton ,
579593 }),
594+ -- New("TextButton", {
595+ -- Size = UDim2.new(0,24,0,24),
596+ -- BackgroundTransparency = 1,
597+ -- LayoutOrder=2,
598+ -- }, {
599+ -- FullscreenButton,
600+ -- }),
580601 New (" TextButton" , {
581602 Size = UDim2 .new (0 ,24 ,0 ,24 ),
582603 BackgroundTransparency = 1 ,
583-
604+ LayoutOrder = 1 ,
584605 }, {
585606 MinimizeButton ,
586607 })
@@ -642,11 +663,11 @@ return function(Config)
642663 Size = UDim2 .new (0 ,24 ,0 ,24 ),
643664 BackgroundTransparency = 1 ,
644665 LayoutOrder = 1 ,
645- ThemeTag = {
666+ ThemeTag = Creator . Icon ( Window . Icon )[ 2 ] and {
646667 ImageColor3 = " Text"
647- }
668+ } or nil
648669 })
649- if Creator .Icon (Window .Icon ) then
670+ if Creator .Icon (Window .Icon )[ 2 ] then
650671 ImageLabel .Image = Creator .Icon (Window .Icon )[1 ]
651672 ImageLabel .ImageRectOffset = Creator .Icon (Window .Icon )[2 ].ImageRectPosition
652673 ImageLabel .ImageRectSize = Creator .Icon (Window .Icon )[2 ].ImageRectSize
@@ -714,6 +735,36 @@ return function(Config)
714735 return Close
715736 end
716737
738+ local CurrentPos
739+ local CurrentSize
740+ local iconCopy = Creator .Icon (" copy" )
741+ local iconSquare = Creator .Icon (" square" )
742+
743+ FullscreenButton .MouseButton1Click :Connect (function ()
744+ local isFullscreen = Window .IsFullscreen
745+ Creator .SetDraggable (isFullscreen )
746+
747+ if not isFullscreen then
748+ CurrentPos = Window .UIElements .Main .Position
749+ CurrentSize = Window .UIElements .Main .Size
750+ FullscreenButton .Image = iconCopy [1 ]
751+ FullscreenButton .ImageRectOffset = iconCopy [2 ].ImageRectPosition
752+ FullscreenButton .ImageRectSize = iconCopy [2 ].ImageRectSize
753+ else
754+ FullscreenButton .Image = iconSquare [1 ]
755+ FullscreenButton .ImageRectOffset = iconSquare [2 ].ImageRectPosition
756+ FullscreenButton .ImageRectSize = iconSquare [2 ].ImageRectSize
757+ end
758+
759+ Tween (Window .UIElements .Main , 0.45 , {Size = isFullscreen and CurrentSize or UDim2 .new (1 ,- 20 ,1 ,- 20 )}, Enum .EasingStyle .Quint , Enum .EasingDirection .Out ):Play ()
760+
761+ delay (0.1 , function ()
762+ Tween (Window .UIElements .Main , 0.45 , {Position = isFullscreen and CurrentPos or Window .Position }, Enum .EasingStyle .Quint , Enum .EasingDirection .Out ):Play ()
763+ end )
764+
765+ Window .IsFullscreen = not isFullscreen
766+ end )
767+
717768 MinimizeButton .MouseButton1Click :Connect (function ()
718769 Window :Close ()
719770 task .spawn (function ()
@@ -883,9 +934,6 @@ return function(Config)
883934 BackgroundTransparency = 1 ,
884935 Parent = Dialog .UIElements .Main
885936 })
886- Content :GetPropertyChangedSignal (" TextBounds" ):Connect (function ()
887- Content .Size = UDim2 .new (1 ,0 ,0 ,Content .TextBounds .Y )
888- end )
889937 end
890938
891939 -- Dialog.UIElements.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
@@ -931,7 +979,7 @@ return function(Config)
931979 },
932980 BackgroundTransparency = .93 ,
933981 Parent = ButtonsContent ,
934- Size = UDim2 .new (1 / # DialogTable .Buttons , - (((# DialogTable .Buttons - 1 ) * 10 ) / # DialogTable .Buttons ), 0 , 00 ),
982+ Size = UDim2 .new (1 / # DialogTable .Buttons , - (((# DialogTable .Buttons - 1 ) * 10 ) / # DialogTable .Buttons ), 0 , 0 ),
935983 AutomaticSize = " Y" ,
936984 }, {
937985 New (" UICorner" , {
@@ -996,21 +1044,23 @@ return function(Config)
9961044 end )
9971045
9981046 local function startResizing (input )
999- isResizing = true
1000- FullScreenIcon .Active = true
1001- initialSize = Window .UIElements .Main .Size
1002- initialInputPosition = input .Position
1003- Tween (FullScreenIcon , 0.2 , {BackgroundTransparency = .65 }):Play ()
1004- Tween (FullScreenIcon .ImageLabel , 0.2 , {ImageTransparency = 0 }):Play ()
1005-
1006- input .Changed :Connect (function ()
1007- if input .UserInputState == Enum .UserInputState .End then
1008- isResizing = false
1009- FullScreenIcon .Active = false
1010- Tween (FullScreenIcon , 0.2 , {BackgroundTransparency = 1 }):Play ()
1011- Tween (FullScreenIcon .ImageLabel , 0.2 , {ImageTransparency = 1 }):Play ()
1012- end
1013- end )
1047+ if not isFullscreen then
1048+ isResizing = true
1049+ FullScreenIcon .Active = true
1050+ initialSize = Window .UIElements .Main .Size
1051+ initialInputPosition = input .Position
1052+ Tween (FullScreenIcon , 0.2 , {BackgroundTransparency = .65 }):Play ()
1053+ Tween (FullScreenIcon .ImageLabel , 0.2 , {ImageTransparency = 0 }):Play ()
1054+
1055+ input .Changed :Connect (function ()
1056+ if input .UserInputState == Enum .UserInputState .End then
1057+ isResizing = false
1058+ FullScreenIcon .Active = false
1059+ Tween (FullScreenIcon , 0.2 , {BackgroundTransparency = 1 }):Play ()
1060+ Tween (FullScreenIcon .ImageLabel , 0.2 , {ImageTransparency = 1 }):Play ()
1061+ end
1062+ end )
1063+ end
10141064 end
10151065
10161066 ResizeHandle .InputBegan :Connect (function (input )
0 commit comments