Skip to content

Commit

Permalink
Removed unused state argument in the update functions of the example
Browse files Browse the repository at this point in the history
The update function does not return any state as second argument
  • Loading branch information
britzl committed Sep 21, 2021
1 parent ac0a530 commit 95fd50d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions example/components.gui_script
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local COLOR_BLACK = vmath.vector4(0,0,0,1)
local COLOR_RED = vmath.vector4(1,0,0,1)


local function update_radiobutton(radiobutton, state)
local function update_radiobutton(radiobutton)
if radiobutton.selected_now then
gui.set_color(radiobutton.node, COLOR_RED)
utils.shake(radiobutton.node, vmath.vector3(1))
Expand All @@ -17,7 +17,7 @@ local function update_radiobutton(radiobutton, state)
end
end

local function update_checkbox(checkbox, state)
local function update_checkbox(checkbox)
if checkbox.checked_now then
gui.set_color(checkbox.node, COLOR_RED)
utils.shake(checkbox.node, vmath.vector3(1))
Expand All @@ -27,7 +27,7 @@ local function update_checkbox(checkbox, state)
end
end

local function update_button(button, state)
local function update_button(button)
if button.over_now then
gui.set_color(button.node, COLOR_LIGHTGREY)
elseif button.out_now then
Expand All @@ -37,7 +37,7 @@ local function update_button(button, state)
end
end

local function update_input(input, state)
local function update_input(input)
if input.pressed_now then
gui.set_color(input.node, COLOR_RED)
elseif input.released_now then
Expand Down

0 comments on commit 95fd50d

Please sign in to comment.