Featured image of post callbacl예제 +1

callbacl예제 +1

utility callback_test " box rotate"
(
 slider left_box “Left” range:[-90,90,0] orient:#vertical offset:[-0,0]
 slider right_box “Right” range:[90,-90,0] orient:#vertical offset:[0,-0]
 button resetv “Reset” width:140
 
 checkbox lockon “Lock” align:#center
 
on resetv pressed do
(
 $Rightbox.rotation.x_rotation = $Leftbox.rotation.x_rotation = 0
 left_box.value = right_box.value = 0
)

on left_box changed val do
(
 $Leftbox.rotation.x_rotation = -val
 if lockon.checked do  
 (
  right_box.value = val
  $Rightbox.rotation.x_rotation = -val
 ) 
)
on Right_box changed val do
(
 $Rightbox.rotation.x_rotation = -val
)

)
 
이 구문을 추가하면 와이퍼처럼 양쪽이 같이 움직이게 된다.
단 Left 에만 추가했으므로 Left만.

맨 아래 이걸 추가시켜주면,
Lock을 눌렀을 때
right 스크롤바가 딤드된다.

on lockon changed state do
(
 if state then right_box.enabled = false
 else right_box.enabled = true
)

Hugo로 만듦
JimmyStack 테마 사용 중