-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from MiaGobble/dev-beta
Settings and shadow support
- Loading branch information
Showing
12 changed files
with
323 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/FigmaImportAssistant/Main/Interface/BooleanSettingInput.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
local Packages = script.Parent.Parent.Parent.Packages | ||
local Component = require(script.Parent.Parent.Component) | ||
local Fusion = require(Packages.Fusion) | ||
local Value = Fusion.Value | ||
local Computed = Fusion.Computed | ||
|
||
return function(MainContentList, IsItemSelected, Inputs, SelectedItem, Data) | ||
local EnabledValue = Value(Data.DefaultValue) | ||
local IsEnabled = Computed(function() | ||
local IsSelected = IsItemSelected:get() | ||
|
||
if not IsSelected then | ||
return false | ||
end | ||
|
||
local Selected = SelectedItem:get() | ||
|
||
if not Selected then | ||
return false | ||
end | ||
|
||
if Data.Context == "ScreenGui" then | ||
return Selected:IsA("ScreenGui") | ||
elseif Data.Context == "Default" then | ||
return not Selected:IsA("ScreenGui") | ||
end | ||
end) | ||
|
||
local This = Component "Checkbox" { | ||
Enabled = IsEnabled, | ||
Visible = IsEnabled, | ||
Name = `Setting_{Data.Name}`, | ||
Text = Data.Text, | ||
LayoutOrder = 6, | ||
Size = UDim2.new(1, 0, 0, 30), | ||
Parent = MainContentList, | ||
Value = EnabledValue, | ||
} | ||
|
||
Inputs[`Setting_{Data.Name}`] = {EnabledValue, Data.DefaultValue} | ||
|
||
return This | ||
end |
33 changes: 33 additions & 0 deletions
33
src/FigmaImportAssistant/Main/Interface/Build/BooleanSettingInputs.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"IsAspectRatioConstrained" : { | ||
"Text": "Keep Aspect Ratio", | ||
"Name": "IsAspectRatioConstrained", | ||
"Type": "Boolean", | ||
"Context": "Default", | ||
"DefaultValue": true | ||
}, | ||
|
||
"ClipDescendants" : { | ||
"Text": "Clip Descendants", | ||
"Name": "ClipDescendants", | ||
"Type": "Boolean", | ||
"Context": "Default", | ||
"DefaultValue": true | ||
}, | ||
|
||
"RespectAutoImportFrameOpacity" : { | ||
"Text": "Respect Auto-Import Frame Opacity", | ||
"Name": "RespectAutoImportFrameOpacity", | ||
"Type": "Boolean", | ||
"Context": "ScreenGui", | ||
"DefaultValue": false | ||
}, | ||
|
||
"RespectAutoImportCornerRadius" : { | ||
"Text": "Respect Auto-Import Corner Radius", | ||
"Name": "RespectAutoImportCornerRadius", | ||
"Type": "Boolean", | ||
"Context": "ScreenGui", | ||
"DefaultValue": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.