32 lines
		
	
	
		
			804 B
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			804 B
		
	
	
	
		
			Plaintext
		
	
	
	
| /*
 | |
| 文件名:LayerObject.nut
 | |
| 路径:Core/BaseClass/LayerObject.nut
 | |
| 创建日期:2024-12-13	21:26
 | |
| 文件用途:
 | |
| */
 | |
| class Layer extends Actor {
 | |
| 
 | |
|     // constructor(...) {
 | |
|     //     local C_Object;
 | |
|     //     if (vargv.len() == 0) {
 | |
|     //         C_Object = LayerActor_Create();
 | |
|     //         base.constructor(C_Object);
 | |
|     //     } else {
 | |
|     //         C_Object = vargv[0];
 | |
|     //         base.constructor(C_Object, true);
 | |
|     //     }
 | |
|     // }
 | |
| 
 | |
|     //设置图层裁剪区域
 | |
|     function SetClipRect(x, y, w, h) {
 | |
|         if (!IsLayer) {
 | |
|             print("SetClipRect:窗口不是图层窗口");
 | |
|         }
 | |
|         LayerActor_SetClipRect(this.C_Object, x, y, w, h);
 | |
|     }
 | |
| 
 | |
|     //设置图层透明度
 | |
|     function SetLayerOpacity(alpha) {
 | |
|         LayerActor_SetOpacity(this.C_Object, alpha);
 | |
|     }
 | |
| } |