68 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			68 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
|  | /* | ||
|  | 文件名:HorseGuessing_PastRecord.nut | ||
|  | 路径:Project/HorseGuessing/HorseGuessing_PastRecord.nut | ||
|  | 创建日期:2024-09-27	19:10 | ||
|  | 文件用途:马战过往战绩窗口 | ||
|  | */ | ||
|  | class HorseGuessing_PastRecordC extends LenheartNewUI_Windows { | ||
|  |     //调试模式 | ||
|  |     // DeBugMode = true; | ||
|  | 
 | ||
|  |     //不是窗口 | ||
|  |     // NoWindow = true; | ||
|  | 
 | ||
|  |     //是否可见 | ||
|  |     // Visible = false; | ||
|  |     constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) { | ||
|  |         Childrens = []; | ||
|  |         //注册控件 | ||
|  |         RegisterWidget(); | ||
|  | 
 | ||
|  |         LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH); | ||
|  |     } | ||
|  | 
 | ||
|  |     function RegisterWidget() {} | ||
|  | 
 | ||
|  |     //绘制主界面 | ||
|  |     function DrawMain(obj) { | ||
|  |         L_sq_DrawImg("interface2/event/chn_event_2016/160927_joustmatches/joustmatches_info_window.img", 26, X, Y); | ||
|  | 
 | ||
|  | 
 | ||
|  |         if (Parent.InfoContestLog) { | ||
|  |             foreach(Pos, Value in Parent.InfoContestLog) { | ||
|  |                 L_sq_DrawCode((format("%03d", Value.Periods)).tostring(), X + 6, Y + 26 + (Pos * 20), sq_RGBA(255, 255, 255, 250), 0, 1); | ||
|  |                 L_sq_DrawImg("interface2/event/chn_event_2016/160927_joustmatches/joustmatches_info_window.img", 38 + Value.code, X + 32, Y + 24 + (Pos * 20)); | ||
|  |                 L_sq_DrawCode(Parent.RiderName[Value.code], X + 32 + 28, Y + 26 + (Pos * 20), sq_RGBA(255, 255, 255, 250), 0, 1); | ||
|  |                 L_sq_DrawCode((format("%.2f", Value.SOdds.tofloat())).tostring(), X + 32 + 28 + 100, Y + 26 + (Pos * 20), sq_RGBA(255, 255, 255, 250), 0, 1); | ||
|  |             } | ||
|  |         } | ||
|  |     } | ||
|  | 
 | ||
|  |     function Show(obj) { | ||
|  |         DrawMain(obj); | ||
|  |         LenheartNewUI_Windows.Show(obj); | ||
|  | 
 | ||
|  |     } | ||
|  | 
 | ||
|  |     //逻辑入口 | ||
|  |     function Proc(obj) { | ||
|  |         LenheartNewUI_Windows.SyncPos(X - 7, Y - 50); | ||
|  | 
 | ||
|  |         if (Parent && Parent.Visible && Parent.PageSelectM == 2) { | ||
|  |             Visible = true; | ||
|  |             X = Parent.X + 7; | ||
|  |             Y = Parent.Y + 50; | ||
|  |         } else { | ||
|  |             Visible = false; | ||
|  |         } | ||
|  |     } | ||
|  | 
 | ||
|  | 
 | ||
|  |     //因为要重载LenheartNewUI_Windows的构造函数 | ||
|  |     function ResetFocus() { | ||
|  | 
 | ||
|  |     } | ||
|  | } | ||
|  | 
 | ||
|  | 
 | ||
|  | getroottable().rawdelete("HorseGuessing_Obj"); |