본문 바로가기
3Ds Max Script

롤아웃 이벤트 테스트2

by 대마왕J 2023. 7. 18.

같은거 한 번 더 해 봅니다. 

CreateDialog

https://help.autodesk.com/view/MAXDEV/2024/ENU/?guid=GUID-816D257C-CD2D-4753-A792-6E7AEFAFA6A7

CreateDialog <Rollout> [<width> <height> <position_x> <position_y>]\ 
[pos:<Point2>] [width:<integer>] [height:<integer>] \ 
[bgcolor:<color>] [fgcolor:<color>] \ 
[bitmap:<bitmap>] {bmpstyle:<bmpstyle> \ 
[menu:<RCMenu>] [style:<array>] [modal:<boolean>] \ 
[escapeEnable:<boolean>] [lockHeight:<boolean>] [lockWidth:<boolean>] \
[autoLayoutOnResize:<boolean>] [parent:<HWND>]
rollout test2 "한글도 잘된다"
(
	label posTex "Test " pos:[100,50]
)
CreateDialog test2 width:200 height:200

롤아웃을 만들었습니다. 기본 텍스쳐는 Test 

https://help.autodesk.com/view/MAXDEV/2024/ENU/?guid=GUID-986FEC5A-A002-4101-948C-66BDE49CD28C 

label <name> [<string>] [style_sunkenedge:<boolean>] [toolTip:<string>]

이걸 보고 조금 바꿔 봅시다 .

rollout test2 "한글도 잘된다"
(
	label posTex "Test " pos:[5,50] toolTip:"마우스 올리면 툴팁 생김" style_sunkenedge:true width:150 height:16
)
CreateDialog test2 width:200 height:200

마우스 오버하면 툴팁도 나옴

GetDialogPos

GetDialogPos 함수를 써봅시다 .

<Point2>GetDialogPos <Rollout> [removeUIScaling: <boolean>]
<Point2>GetDialogSize <Rollout>  [removeUIScaling: <boolean>]
rollout test2 "한글도 잘된다"
(
	label posTex "Test " pos:[5,50] toolTip:"마우스 올리면 툴팁 생김" style_sunkenedge:true width:150 height:16
	
	on test2 lbuttondown pos do
	(
		p = GetDialogPos test2
		posTex.text = p as string
	)	
)
CreateDialog test2 width:200 height:200

이렇게 하면 왼쪽 클릭을 할 때 포지션을 가져와 출력합니다 

SetDialogPos

다이얼로그의 위치를 옮깁니다. 

SetDialogPos <Rollout> <Point2> [applyUIScaling: <boolean>]
rollout test2 "한글도 잘된다"
(
	label posTex "Test " pos:[5,50] toolTip:"마우스 올리면 툴팁 생김" style_sunkenedge:true width:150 height:16
	
	on test2 lbuttondown pos do
	(
		p = GetDialogPos test2
		posTex.text = p as string
	)
	
	on test2 rbuttondown pos do
	(
		SetDialogPos test2 [10,10] 
	)	
)
CreateDialog test2 width:200 height:200

 

반응형

'3Ds Max Script' 카테고리의 다른 글

롤아웃에 비트맵 띄우기  (0) 2023.07.19
try catch로 롤아웃 하나만 열기  (0) 2023.07.18
롤아웃 이벤트 테스트  (0) 2023.07.14
맥스 스크립트 한글 주석이 깨질때  (0) 2023.07.14
특정 문자 치환하기  (0) 2023.07.12

댓글