mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	NEW: add christmas cabin
Change-Id: Icf9a56c2fdcc34e8eda6254dbb7d33695b41fc7f
This commit is contained in:
		
							parent
							
								
									545fdbf96b
								
							
						
					
					
						commit
						d8f0749474
					
				
					 8 changed files with 139 additions and 1 deletions
				
			
		|  | @ -12,6 +12,9 @@ function OnInit() | |||
| 
 | ||||
| 	SendMsg_GetLoginInfo(); | ||||
| 	SendMsg_GetRecentFile(); | ||||
| 	 | ||||
| 	//-----Christmas-----
 | ||||
| 	ShowCabin(); | ||||
| } | ||||
| 
 | ||||
| //------最佳打开文件的右键菜单功能----------
 | ||||
|  | @ -22,7 +25,7 @@ var MousePosY=0; | |||
| 
 | ||||
| function Set_RecentFile_MouseRightBtn_Event() | ||||
| { | ||||
| 	$(".FileItem").mousedown( | ||||
| 	$("#FileList .FileItem").mousedown( | ||||
| 		function(e) | ||||
| 		{			 | ||||
| 			//FilePath
 | ||||
|  | @ -401,3 +404,66 @@ function OpenWikiUrl( strUrl ) | |||
| 
 | ||||
| //---------------Global-----------------
 | ||||
| window.postMessage = HandleStudio; | ||||
| 
 | ||||
| 
 | ||||
| //---------------Christma cabin
 | ||||
| var CCabin={ | ||||
| 	"model":[ | ||||
| 		{ | ||||
| 			"name":"Christmas Cabin X1 X1C", | ||||
| 			"icon":"Cover_X1_X1C.png", | ||||
| 			"file":"Bambu Lab Christmas Cabin X1 X1C.gcode.3mf" | ||||
| 		}, | ||||
| 		{ | ||||
| 			"name":"Christmas Cabin P1P", | ||||
| 			"icon":"Cover_P1P.png", | ||||
| 			"file":"Bambu Lab Christmas Cabin P1P.gcode.3mf" | ||||
| 		}	 | ||||
| 	]	 | ||||
| }; | ||||
| 
 | ||||
| function ShowCabin() | ||||
| { | ||||
| 	let nCabin=CCabin.model.length; | ||||
| 
 | ||||
| 	if(nCabin==0) | ||||
| 	{ | ||||
| 		$('#CabinList').html(''); | ||||
| 	 | ||||
| 	    $('#ChristmasArea').hide(); | ||||
| 		return; | ||||
| 	} | ||||
| 	 | ||||
| 	let strHtml=''; | ||||
| 	for(let m=0;m<nCabin;m++) | ||||
| 	{ | ||||
| 		let OneCabin=CCabin.model[m]; | ||||
| 		 | ||||
| 		let OneHtml='<div class="FileItem" onClick="OnOpenCabin(\''+OneCabin.file+'\')" >'+ | ||||
| 				    '<div class="FileImg"><img src="model/'+OneCabin.icon+'"/></div>'+ | ||||
| 				    '<div class="FileName TextS1">'+OneCabin.name+'</div>'+ | ||||
| 			        '</div>'; | ||||
| 		 | ||||
| 		strHtml+=OneHtml; | ||||
| 	} | ||||
| 	 | ||||
| 	$('#CabinList').html(strHtml); | ||||
| 	 | ||||
| 	$('#ChristmasArea').show(); | ||||
| 	$('#ChristmasArea').css('display','flex'); | ||||
| } | ||||
| 
 | ||||
| function OnOpenCabin( cabinfile ) | ||||
| { | ||||
| 	//alert(cabinfile);
 | ||||
| 	 | ||||
| 	var tSend={}; | ||||
| 	tSend['sequence_id']=Math.round(new Date() / 1000); | ||||
| 	tSend['command']="homepage_open_ccabin"; | ||||
| 	tSend['data']={}; | ||||
| 	tSend['data']['file']=cabinfile; | ||||
| 	 | ||||
| 	SendWXMessage( JSON.stringify(tSend) );		 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 zorro.zhang
						zorro.zhang