@@ -330,8 +330,8 @@ return function()
330330 end )
331331
332332 it (" Should work with click zone" , function ()
333- local button = gui .new_box_node (vmath .vector3 (50 , 25 , 0 ), vmath .vector3 (100 , 50 , 0 ))
334- local zone = gui .new_box_node (vmath .vector3 (50 , 50 , 0 ), vmath .vector3 (50 , 50 , 0 ))
333+ local button = gui .new_box_node (vmath .vector3 (0 , 0 , 0 ), vmath .vector3 (200 , 200 , 0 ))
334+ local zone = gui .new_box_node (vmath .vector3 (0 , 0 , 0 ), vmath .vector3 (50 , 50 , 0 ))
335335 local button_params = {}
336336
337337 local on_click_calls = 0
@@ -341,12 +341,13 @@ return function()
341341
342342 local instance = druid :new_button (button , on_click , button_params )
343343 instance :set_click_zone (zone )
344- druid :on_input (mock_input .click_pressed (10 , 10 ))
345- druid :on_input (mock_input .click_released (10 , 10 ))
344+
345+ druid :on_input (mock_input .click_pressed (70 , 70 ))
346+ druid :on_input (mock_input .click_released (70 , 70 ))
346347 assert (on_click_calls == 0 )
347348
348- druid :on_input (mock_input .click_pressed (50 , 50 ))
349- druid :on_input (mock_input .click_released (50 , 50 ))
349+ druid :on_input (mock_input .click_pressed (10 , 10 ))
350+ druid :on_input (mock_input .click_released (10 , 10 ))
350351 assert (on_click_calls == 1 )
351352 end )
352353
0 commit comments