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

ProgressBar and Tweaks #44

Merged
merged 4 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
22 changes: 17 additions & 5 deletions dev.project.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,26 @@
}
},
"ServerScriptService": {
"IrisExamplePlugin": {
"$path": "src/plugin",
"Iris": {
"$path": "default.project.json"
"Plugins": {
"$className": "Folder",
"IrisExamplePlugin": {
"$path": "src/plugins",
"Iris": {
"$path": "default.project.json"
},
"UserInputService": {
"$path": "src/libraries/UserInputService"
}
}
},
"tests": {
"Tests": {
"$path": "tests"
},
"Stories": {
"$path": "stories",
"UserInputService": {
"$path": "src/libraries/UserInputService"
}
}
},
"StarterPlayer": {
Expand Down
9 changes: 9 additions & 0 deletions lib/widgets/Input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,15 @@ return function(Iris: Types.Internal, widgets: Types.WidgetUtility)

GrabBar.Size = UDim2.new(grabScaleSize, 0, 1, 0)
end

local callbackIndex: number = #Iris._postCycleCallbacks + 1
local desiredCycleTick: number = Iris._cycleTick + 1
Iris._postCycleCallbacks[callbackIndex] = function()
if Iris._cycleTick == desiredCycleTick then
Iris._widgets[`Slider{dataType}`].UpdateState(thisWidget)
Iris._postCycleCallbacks[callbackIndex] = nil
end
end
end,
Discard = function(thisWidget: Types.Widget)
thisWidget.Instance:Destroy()
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/Plot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ return function(Iris: Types.Internal, widgets: Types.WidgetUtility)

local TextLabel: TextLabel = Instance.new("TextLabel")
TextLabel.Name = "TextLabel"
TextLabel.AnchorPoint = Vector2.new(1, 0.5)
TextLabel.AnchorPoint = Vector2.new(0, 0.5)
TextLabel.AutomaticSize = Enum.AutomaticSize.XY
TextLabel.BackgroundTransparency = 1
TextLabel.BorderSizePixel = 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local Signal = require(script.Parent.Signal)
local Signal = require(script.Signal)

local UserInputService: UserInputService = game:GetService("UserInputService")

Expand Down
43 changes: 0 additions & 43 deletions src/plugin/examplePlugin/testing.client.story.lua

This file was deleted.

28 changes: 28 additions & 0 deletions stories/exampleStory.story.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
local ReplicatedStorage = game:GetService("ReplicatedStorage")

return function(parent: GuiObject)
local Iris = require(ReplicatedStorage.Iris)
local Input = require(script.Parent.UserInputService)

Input.SinkFrame.Parent = parent

Iris.Internal._utility.UserInputService = Input
Iris.UpdateGlobalConfig({
UseScreenGUIs = false,
})

Iris.Init(parent)

-- Actual Iris code here:
Iris:Connect(Iris.ShowDemoWindow)

return function()
Iris.Shutdown()

for _, connection in Input._connections do
connection:Disconnect()
end

Input.SinkFrame:Destroy()
end
end
File renamed without changes.