mirror of
				https://github.com/unanmed/HumanBreak.git
				synced 2025-11-04 15:12:58 +08:00 
			
		
		
		
	Deploying to gh-pages from  @ 34154e77c1 🚀
				
					
				
			This commit is contained in:
		
							parent
							
								
									b02f8f06c9
								
							
						
					
					
						commit
						84ed897a4f
					
				
							
								
								
									
										47
									
								
								libs/ui.js
									
									
									
									
									
								
							
							
						
						
									
										47
									
								
								libs/ui.js
									
									
									
									
									
								
							@ -942,19 +942,40 @@ ui.prototype.clearUI = function () {
 | 
			
		||||
 | 
			
		||||
////// 左上角绘制一段提示 //////
 | 
			
		||||
ui.prototype.drawTip = function (text, id, frame) {
 | 
			
		||||
    let t =
 | 
			
		||||
        text +
 | 
			
		||||
        ' [' +
 | 
			
		||||
        core.status.hero.loc.x +
 | 
			
		||||
        ',' +
 | 
			
		||||
        core.status.hero.loc.y +
 | 
			
		||||
        ',' +
 | 
			
		||||
        core.status.floorId +
 | 
			
		||||
        ']  ';
 | 
			
		||||
    if (core.status.floorId === 'tower6')
 | 
			
		||||
        t += core.searchBlockWithFilter(v => v.event.cls === 'enemys').length;
 | 
			
		||||
 | 
			
		||||
    console.log(t);
 | 
			
		||||
    text = core.replaceText(text) || '';
 | 
			
		||||
    var realText = this._getRealContent(text);
 | 
			
		||||
    var one = {
 | 
			
		||||
        text: text,
 | 
			
		||||
        textX: 21,
 | 
			
		||||
        width: 26 + core.calWidth('data', realText, '16px Arial'),
 | 
			
		||||
        opacity: 0.1,
 | 
			
		||||
        stage: 1,
 | 
			
		||||
        frame: frame || 0,
 | 
			
		||||
        time: 0
 | 
			
		||||
    };
 | 
			
		||||
    if (id != null) {
 | 
			
		||||
        var info = core.getBlockInfo(id);
 | 
			
		||||
        if (info == null || !info.image || info.bigImage) {
 | 
			
		||||
            // 检查状态栏图标
 | 
			
		||||
            if (core.statusBar.icons[id] instanceof Image) {
 | 
			
		||||
                info = {
 | 
			
		||||
                    image: core.statusBar.icons[id],
 | 
			
		||||
                    posX: 0,
 | 
			
		||||
                    posY: 0,
 | 
			
		||||
                    height: 32
 | 
			
		||||
                };
 | 
			
		||||
            } else info = null;
 | 
			
		||||
        }
 | 
			
		||||
        if (info != null) {
 | 
			
		||||
            one.image = info.image;
 | 
			
		||||
            one.posX = info.posX;
 | 
			
		||||
            one.posY = info.posY;
 | 
			
		||||
            one.height = info.height;
 | 
			
		||||
            one.textX += 24;
 | 
			
		||||
            one.width += 24;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    core.animateFrame.tip = one;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
ui.prototype._drawTip_drawOne = function (tip) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user