Flex Panel Node 최소 너비 가져오기
이 문서는 flexpanel_node_style_get_min_width
함수에 대해 설명합니다. 이 함수는 주어진 Flex Panel Node의 최소 너비(minWidth) 속성을 반환합니다.
함수 설명
함수 이름
flexpanel_node_style_get_min_width
문법
flexpanel_node_style_get_min_width(node);
매개변수
매개변수 | 타입 | 설명 |
---|---|---|
node | Flex Panel Node | 읽어올 노드 |
반환값
- Flex Panel Unit-Value Struct: 주어진 노드의 최소 너비를 반환합니다.
예제
var _min_width = flexpanel_node_style_get_min_width(_node);
위 코드는 노드의 최소 너비를 가져와서 로컬 변수에 저장합니다.
활용 예제
- 노드의 최소 너비 설정
flexpanel_node_style_set_min_width(_node, 100);
이 코드는 노드의 최소 너비를 100으로 설정합니다.
- 조건에 따라 최소 너비 조정
if (flexpanel_node_style_get_min_width(_node) < 50) {
flexpanel_node_style_set_min_width(_node, 50);
}
이 코드는 노드의 최소 너비가 50보다 작으면 50으로 설정합니다.
- 모든 노드의 최소 너비 출력
for (var i = 0; i < array_length(_nodes); i++) {
var min_width = flexpanel_node_style_get_min_width(_nodes[i]);
show_message("Node " + string(i) + " Min Width: " + string(min_width));
}
이 코드는 모든 노드의 최소 너비를 출력합니다.
- UI 요소의 최소 너비 조정
if (some_condition) {
flexpanel_node_style_set_min_width(_ui_element, 200);
}
이 코드는 특정 조건에 따라 UI 요소의 최소 너비를 200으로 설정합니다.