← 수업 제작 도구
홈 › Components › Action Button (행동 버튼) › 화면 10

화면 10. Button.resetStyle [sink]

원본: Computation Layer 문서(Action Button (행동 버튼)) · Try It (원본 화면)

화면 번호10 / 12
문서 항목 설명 (원문)resetStyle Sets the button style when in "reset" state. Use "link" for our standard link or "white" for button styling on a dark background.

1. 화면 캡처 (빨간 번호 = 아래 표의 번호)

화면 10 캡처

화면에 적힌 영어 문구(원문):

2. CL이 입력된 곳

코드 안의 회색 줄은 원문 영어 주석이고, 파란 줄은 그 영어 주석의 번역이며, 연분홍 줄은 코드가 하는 일의 설명이다.

번호이름종류CL 코드 원문, 번역, 설명
1레이블 없는 그래프그래프
# "a" is the variable that drives the animation in the 
# calculator. We've defined it by the button timer.
▷ "a"는 계산기 안의 애니메이션을 움직이는 변수이다. 버튼의 타이머로 정했다.

number("a"): button.timeSincePress(20)
▶ 그래프의 변수 a는 행동 버튼 button을 누른 뒤 지난 시간(button.timeSincePress(20))으로 한다.
number("이름")은 그래핑 계산기 안의 변수 값을 정하고, timeSincePress(20)의 괄호 안 20은 세는 최대 시간이 20초라는 뜻이다.
2button행동 버튼
# This controls the reset style of the button label.
▷ 이것은 버튼 라벨이 재설정 상태일 때의 스타일을 조절한다.

resetStyle: buttonStyles.red
▶ 행동 버튼의 재설정 스타일(resetStyle)은 buttonStyles.red로 한다.
resetStyle은 버튼이 재설정 상태일 때의 스타일을 정하고, buttonStyles.red는 빨간 스타일이다.
# Sets the text of the reset label so it will appear. ▷ 재설정 라벨의 글자를 정해 나타나게 한다. resetLabel: "Reset" ▶ 행동 버튼의 재설정 라벨(resetLabel)은 "Reset"(재설정)으로 한다.
resetLabel은 재설정 링크에 표시할 글자를 정한다.