52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
|  | /* | ||
|  | 文件名:Lenheart_Cursor_Class.nut | ||
|  | 路径:Base/UI/Lenheart_Cursor_Class.nut | ||
|  | 创建日期:2024-09-25	19:23 | ||
|  | 文件用途:鼠标绘制逻辑 | ||
|  | */ | ||
|  | class Rindro_Cursor { | ||
|  | 
 | ||
|  |     UseState = 0; | ||
|  | 
 | ||
|  |     TypeState = 0; | ||
|  |     SubState = 0; | ||
|  | 
 | ||
|  |     constructor() { | ||
|  | 
 | ||
|  |     } | ||
|  | 
 | ||
|  |     function Proc(Xpos, Ypos) { | ||
|  | 
 | ||
|  |         //使用自建的鼠标绘制函数 | ||
|  |         if (UseState) { | ||
|  |             //工作类型为0 | ||
|  |             if (TypeState == 0) { | ||
|  |                 //常规状态 | ||
|  |                 if (SubState == 0) { | ||
|  |                     L_sq_DrawImg("interface/newstyle/windows/cursor.img", 0, Xpos, Ypos); | ||
|  |                 } | ||
|  |                 //按下状态 | ||
|  |                 else if (SubState == 1) { | ||
|  |                     L_sq_DrawImg("interface/newstyle/windows/cursor.img", 1, Xpos, Ypos); | ||
|  |                 } | ||
|  |             } else { | ||
|  |                 L_sq_DrawImg("interface/newstyle/windows/cursor.img", TypeState, Xpos, Ypos); | ||
|  |             } | ||
|  | 
 | ||
|  |         } | ||
|  |     } | ||
|  | 
 | ||
|  |     function Sync(Xpos, Ypos) { | ||
|  |         Proc(Xpos, Ypos); | ||
|  |         return UseState; | ||
|  |     } | ||
|  | } | ||
|  | _Rindro_Cusor_ <- Rindro_Cursor(); | ||
|  | 
 | ||
|  | function SyncRindro_Cursor(Xpos, Ypos) { | ||
|  |     if (getroottable().rawin("_Rindro_Cusor_")) { | ||
|  |         local Ret = _Rindro_Cusor_.Sync(Xpos, Ypos); | ||
|  |         return Ret; | ||
|  |     } | ||
|  |     return false; | ||
|  | } |