| public: | |
| enum DrawMode { | |
| DRAW_NORMAL, | |
| DRAW_PRESSED, | |
| DRAW_HOVER, | |
| DRAW_DISABLED, | |
| }; | |
| DrawMode get_draw_mode() const; | |
| /* Signals */ | |
| bool is_pressed() const; ///< return wether button is pressed (toggled in) | |
| bool is_pressing() const; ///< return wether button is pressed (toggled in) | |
| bool is_hovered() const; | |
| void set_pressed(bool p_pressed); ///only works in toggle mode | |
| void set_toggle_mode(bool p_on); | |
bool is_toggle_mode() const;
|
뉴비가 게임엔진 오픈소스 보는중인데요..
저렇게 bool is_pressed() const; 같이 함수선언 뒤에 const를 붙이는게 어떤 뜻이죠..??
함수안의 코드를 외부에서 바꾸게 되는 위험을 없애려고 붙이는건가요??
클래스 내부 변수 값을 안바꾼다구용 - 164260의 휘발성 계정
is, get, set 요런거 붙어있는건 const가 어디든 붙게 해야함
ㄴ set도? - 164260의 휘발성 계정
set은 아니디ㅋㅋ
감사합니다~
RTFM - return 0;