Skip to content

Commit

Permalink
Upgraded versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sir Mallard committed Jul 24, 2024
1 parent 4ca5a2b commit da5a4ed
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
with:
version: 0.20.0
token: ${{ secrets.GITHUB_TOKEN }}
args: --check .
args: --check --output-format=Summary .
4 changes: 2 additions & 2 deletions aftman.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# To add a new tool, add an entry to this table.
[tools]
rojo = "rojo-rbx/[email protected].0"
rojo = "rojo-rbx/[email protected].2"
wally = "UpliftGames/[email protected]"
stylua = "johnnymorganz/[email protected]"
selene = "Kampfkarren/selene@0.25.0"
selene = "Kampfkarren/selene@0.27.1"
9 changes: 0 additions & 9 deletions foreman.toml

This file was deleted.

20 changes: 10 additions & 10 deletions lib/demoWindow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ return function(Iris: Types.Iris)

local AssetState = Iris.State("rbxasset://textures/ui/common/robux.png")
local SizeState = Iris.State(UDim2.fromOffset(100, 100))
local RectState = Iris.State(Rect.new())
local RectState = Iris.State(Rect.new(0, 0, 0, 0))
local ScaleTypeState = Iris.State(Enum.ScaleType.Stretch)
local PixelatedCheckState = Iris.State(false)
local PixelatedState = Iris.ComputedState(PixelatedCheckState, function(check: boolean)
Expand Down Expand Up @@ -139,7 +139,7 @@ return function(Iris: Types.Iris)
Tree = function()
Iris.Tree({ "Trees" })
do
Iris.Tree({ "Tree using SpanAvailWidth", [Iris.Args.Tree.SpanAvailWidth] = true })
Iris.Tree({ "Tree using SpanAvailWidth", true })
do
helpMarker("SpanAvailWidth determines if the Tree is selectable from its entire with, or only the text area")
end
Expand Down Expand Up @@ -239,7 +239,7 @@ return function(Iris: Types.Iris)

Iris.PushConfig({ ContentWidth = UDim.new(1, -120) })
local InputNum = Iris.InputNum({
"Input Number",
[Iris.Args.InputNum.Text] = "Input Number",
-- [Iris.Args.InputNum.NoField] = NoField.value,
[Iris.Args.InputNum.NoButtons] = NoButtons.value,
[Iris.Args.InputNum.Min] = Min.value,
Expand Down Expand Up @@ -318,7 +318,7 @@ return function(Iris: Types.Iris)
InputText = function()
Iris.Tree({ "Input Text" })
do
local InputText = Iris.InputText({ "Input Text Test", [Iris.Args.InputText.TextHint] = "Input Text here" })
local InputText = Iris.InputText({ "Input Text Test", "Input Text here" })
Iris.Text({ "The text is: " .. InputText.text.value })
end
Iris.End()
Expand Down Expand Up @@ -517,7 +517,7 @@ return function(Iris: Types.Iris)

Iris.SameLine()
do
Iris.InputNum({ "", [Iris.Args.InputNum.Format] = "%d Seconds", [Iris.Args.InputNum.Max] = 10 }, { number = numSecondsDisabled })
Iris.InputNum({ [Iris.Args.InputNum.Text] = "", [Iris.Args.InputNum.Format] = "%d Seconds", [Iris.Args.InputNum.Max] = 10 }, { number = numSecondsDisabled })
if Iris.Button({ "Disable" }).clicked() then
Iris.Disabled = true
task.delay(numSecondsDisabled:get(), function()
Expand Down Expand Up @@ -553,7 +553,7 @@ return function(Iris: Types.Iris)
local enteredWidget = lastVDOM[enteredText]
local enteredState = states[enteredText]
if enteredWidget then
Iris.Table({ 1, [Iris.Args.Table.RowBg] = false })
Iris.Table({ 1 })
Iris.Text({ string.format('The ID, "%s", is a widget', enteredText) })
Iris.NextRow()

Expand All @@ -576,7 +576,7 @@ return function(Iris: Types.Iris)
end
Iris.End()
elseif enteredState then
Iris.Table({ 1, [Iris.Args.Table.RowBg] = false })
Iris.Table({ 1 })
Iris.Text({ string.format('The ID, "%s", is a state', enteredText) })
Iris.NextRow()

Expand Down Expand Up @@ -1080,7 +1080,7 @@ return function(Iris: Types.Iris)

Iris.Text({ "Table with Customizable Arguments" })
Iris.Table({
4,
[Iris.Args.Table.NumColumns] = 4,
[Iris.Args.Table.RowBg] = TableRowBg.value,
[Iris.Args.Table.BordersOuter] = TableBordersOuter.value,
[Iris.Args.Table.BordersInner] = TableBordersInner.value,
Expand Down Expand Up @@ -1111,7 +1111,7 @@ return function(Iris: Types.Iris)
Iris.End()

Iris.InputNum({
"Number of rows",
[Iris.Args.InputNum.Text] = "Number of rows",
[Iris.Args.InputNum.Min] = 0,
[Iris.Args.InputNum.Max] = 100,
[Iris.Args.InputNum.Format] = "%d",
Expand Down Expand Up @@ -1222,7 +1222,7 @@ return function(Iris: Types.Iris)

debug.profilebegin("Iris/Demo/Window")
local window: Types.Widget = Iris.Window({
"Iris Demo Window",
[Iris.Args.Window.Title] = "Iris Demo Window",
[Iris.Args.Window.NoTitleBar] = NoTitleBar.value,
[Iris.Args.Window.NoBackground] = NoBackground.value,
[Iris.Args.Window.NoCollapse] = NoCollapse.value,
Expand Down
2 changes: 1 addition & 1 deletion lib/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Iris.Events = {}
Once initialized, [Iris.Connect] can be used to create a widget.
]=]
function Iris.Init(parentInstance: BasePlayerGui?, eventConnection: (RBXScriptSignal | () -> ())?, config: { [string]: any }?): Types.Iris
function Iris.Init(parentInstance: BasePlayerGui?, eventConnection: (RBXScriptSignal | () -> ())?): Types.Iris
assert(Internal._started == false, "Iris.Init can only be called once.")
assert(Internal._shutdown == false, "Iris.Init cannot be called once shutdown.")

Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/Input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ return function(Iris: Types.Internal, widgets: Types.WidgetUtility)
end
end)

function generateSliderScalar(dataType: Types.InputDataTypes, components: number, defaultValue: any, ...: any)
function generateSliderScalar(dataType: Types.InputDataTypes, components: number, defaultValue: any)
return {
hasState = true,
hasChildren = false,
Expand Down
16 changes: 8 additions & 8 deletions lib/widgets/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -376,37 +376,37 @@ return function(Iris: Types.Internal)
end
end

function widgets.applyButtonClick(thisWidget: Types.Widget, thisInstance: GuiButton, callback: () -> ())
function widgets.applyButtonClick(_thisWidget: Types.Widget, thisInstance: GuiButton, callback: () -> ())
thisInstance.MouseButton1Click:Connect(function()
callback()
end)
end

function widgets.applyButtonDown(thisWidget: Types.Widget, thisInstance: GuiButton, callback: (x: number, y: number) -> ())
function widgets.applyButtonDown(_thisWidget: Types.Widget, thisInstance: GuiButton, callback: (x: number, y: number) -> ())
thisInstance.MouseButton1Down:Connect(function(...)
callback(...)
end)
end

function widgets.applyMouseEnter(thisWidget: Types.Widget, thisInstance: GuiObject, callback: () -> ())
function widgets.applyMouseEnter(_thisWidget: Types.Widget, thisInstance: GuiObject, callback: () -> ())
thisInstance.MouseEnter:Connect(function(...)
callback()
callback(...)
end)
end

function widgets.applyMouseLeave(thisWidget: Types.Widget, thisInstance: GuiObject, callback: () -> ())
function widgets.applyMouseLeave(_thisWidget: Types.Widget, thisInstance: GuiObject, callback: () -> ())
thisInstance.MouseLeave:Connect(function(...)
callback()
callback(...)
end)
end

function widgets.applyInputBegan(thisWidget: Types.Widget, thisInstance: GuiButton, callback: (input: InputObject) -> ())
function widgets.applyInputBegan(_thisWidget: Types.Widget, thisInstance: GuiButton, callback: (input: InputObject) -> ())
thisInstance.InputBegan:Connect(function(...)
callback(...)
end)
end

function widgets.applyInputEnded(thisWidget: Types.Widget, thisInstance: GuiButton, callback: (input: InputObject) -> ())
function widgets.applyInputEnded(_thisWidget: Types.Widget, thisInstance: GuiButton, callback: (input: InputObject) -> ())
thisInstance.InputEnded:Connect(function(...)
callback(...)
end)
Expand Down
8 changes: 4 additions & 4 deletions src/libraries/UserInputService/Signal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ end

-- Make Connection strict
setmetatable(Connection, {
__index = function(tb, key)
__index = function(_, key)
error(("Attempt to get Connection::%s (not a valid member)"):format(tostring(key)), 2)
end,
__newindex = function(tb, key, value)
__newindex = function(_, key, _)
error(("Attempt to set Connection::%s (not a valid member)"):format(tostring(key)), 2)
end,
})
Expand Down Expand Up @@ -169,10 +169,10 @@ end

-- Make signal strict
setmetatable(Signal, {
__index = function(tb, key)
__index = function(_, key)
error(("Attempt to get Signal::%s (not a valid member)"):format(tostring(key)), 2)
end,
__newindex = function(tb, key, value)
__newindex = function(_, key, _)
error(("Attempt to set Signal::%s (not a valid member)"):format(tostring(key)), 2)
end,
})
Expand Down
2 changes: 1 addition & 1 deletion tests/Widgets.spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ type TestingData = {
},
}

return function(Iris: Types.Iris) end
return function(_Iris: Types.Iris) end

0 comments on commit da5a4ed

Please sign in to comment.