チェンジセット 1474
- コミット日時:
- 2008/10/02 04:14:32 (3 ヶ月前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
mxp/specialbutton/as3/src/buttonBox_Labels.as
r1450 r1474 27 27 public var __bold :Boolean = false; 28 28 public var __italic :Boolean = false; 29 public var __shadow Position_x:Number = 1;30 public var __shadow Position_y:Number = 1;29 public var __shadowMargin_x :Number = 1; 30 public var __shadowMargin_y :Number = 1; 31 31 public var __labelMargin :Number = 2; 32 32 public var __imagePosition :String = "左中"; … … 203 203 } 204 204 // -------------------------------------------------------------------// 205 public function set shadow Position(_nums:Array) {206 txtLabel_mc.shadow Position = _nums;205 public function set shadowMargin(_nums:Array) { 206 txtLabel_mc.shadowMargin = _nums; 207 207 } 208 208 // -------------------------------------------------------------------// … … 294 294 } 295 295 // -------------------------------------------------------------------// 296 public function get shadow Position():Array {297 return [txtLabel_mc.__shadow Position_x,txtLabel_mc.__shadowPosition_y];296 public function get shadowMargin():Array { 297 return [txtLabel_mc.__shadowMargin_x,txtLabel_mc.__shadowMargin_y]; 298 298 } 299 299 // -------------------------------------------------------------------// … … 312 312 // public Function 313 313 // -------------------------------------------------------------------// 314 public function get isImageVisible():Boolean{ 315 return imgLabel_mc.visible; 316 } 317 public function get isTextVisible():Boolean{ 318 return txtLabel_mc.visible; 319 } 314 320 // -------------------------------------------------------------------// 315 321 // private Function mxp/specialbutton/as3/src/buttonBox_textLabels.as
r1450 r1474 21 21 public var __italic :Boolean = false; 22 22 public var __underline :Boolean = false; 23 public var __shadow Position_x:Number = 1;24 public var __shadow Position_y:Number = 1;23 public var __shadowMargin_x :Number = 1; 24 public var __shadowMargin_y :Number = 1; 25 25 public var __autoSize :Boolean= false; 26 26 public var border :Shape = new Shape(); … … 40 40 } 41 41 // -------------------------------------------------------------------// 42 public override function set height(_num:Number):void { 43 __h = _num; 44 updateText(); 45 } 46 // -------------------------------------------------------------------// 42 47 public function set label(_str:String):void { 43 48 __label = _str; … … 75 80 } 76 81 // -------------------------------------------------------------------// 77 public function set shadow Position(_nums:Array) {78 __shadow Position_x = _nums[0];79 __shadow Position_y = _nums[1];82 public function set shadowMargin(_nums:Array) { 83 __shadowMargin_x = _nums[0]; 84 __shadowMargin_y = _nums[1]; 80 85 shadow_txt.x = _nums[0]; 81 86 shadow_txt.y = _nums[1]; … … 84 89 public function set autoSize(_bool:Boolean) { 85 90 __autoSize = _bool; 91 updateText(); 86 92 } 87 93 // -------------------------------------------------------------------// … … 92 98 } 93 99 // -------------------------------------------------------------------// 100 public override function get height():Number { 101 return __h; 102 } 103 // -------------------------------------------------------------------// 94 104 public function get label():String { 95 105 return __label; … … 120 130 } 121 131 // -------------------------------------------------------------------// 122 public function get shadow Position():Array {123 return [__shadow Position_x,__shadowPosition_y];132 public function get shadowMargin():Array { 133 return [__shadowMargin_x,__shadowMargin_y]; 124 134 } 125 135 // -------------------------------------------------------------------// … … 134 144 // -------------------------------------------------------------------// 135 145 private function updateText() { 136 trace("updateText");137 var _ hMargin = (__leading*2+__size);146 var _hMargin = (__leading*2); 147 var _wMargin = 5; 138 148 139 149 var lbl_fmt = new TextFormat(); … … 158 168 label_txt.height = label_txt.textHeight+_hMargin; 159 169 } 160 label_txt.setTextFormat(lbl_fmt);161 170 //shadow 162 171 var sdw_fmt = new TextFormat(); … … 180 189 shadow_txt.height = shadow_txt.textHeight+_hMargin; 181 190 } 182 shadow_txt.setTextFormat(sdw_fmt); 191 192 //widthをtextWidth合わせる(さらにその場合はwMarginも付け加えておく) 193 if(label_txt.textWidth < label_txt.width){ 194 label_txt.width = label_txt.textWidth+_wMargin; 195 shadow_txt.width = shadow_txt.textWidth+_wMargin; 196 } 183 197 184 198 checkBorderLine(); 185 199 } 186 200 // -------------------------------------------------------------------// 201 //テキストボックスの境界線のチェック 187 202 private function checkBorderLine() { 188 203 border.graphics.clear(); … … 195 210 this.addChild(border); 196 211 } 212 // -------------------------------------------------------------------// 197 213 } 198 214 }
