[LayaAir 2.0]Slider控件的标签不居中
		protected function showValueText():void {
			if (showLabel) {
				var label:Label = Slider.label;
				addChild(label);
				label.textField.changeText(_value + "");
				if (isVertical) {
					label.x = _bar._x + 20;
					label.y = (_bar.height - label.height) * 0.5 + _bar._y;
				} else {
					label.y = _bar._y - 20;
					label.x = (_bar.width - label.width) * 0.5 + _bar._x;
				}
			}
		}在Slider类里面显示改变标签使用的是label.textField.changeText,导致label不会重新计算尺寸,后面的坐标计算使用的label.width不能反映label的真实宽度
															没有找到相关结果
									已邀请:
																	
							
1 个回复
Aar0n
赞同来自: