チェンジセット 1522

差分発生行の前後
無視リスト:
コミット日時:
2008/10/05 18:42:03 (3 ヶ月前)
コミッタ:
n_mattun
ログメッセージ:

最新版うp。

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • mxp/specialbutton/as3/src/BorderBox.as

    r1449 r1522  
    4242                public var __w                  :Number = 80; 
    4343                public var __h                  :Number = 20; 
     44                public var __alpha              :Number = 1; 
    4445                public var __color              :uint   = 0x000000; 
    4546                public var __cornerSize :Number = 5; 
     
    5152                public function BorderBox(){ 
    5253                        //whを取得したのちscale値を元に戻す 
    53                         this.__w = super.width; 
    54                         this.__h = super.height; 
     54                        var _rw = super.width; 
     55                        var _rh = super.height; 
     56                        this.__w = Math.floor(_rw); 
     57                        this.__h = _rh; 
    5558                        this.scaleX = 1; 
    5659                        this.scaleY = 1; 
    57                         this.setCornerPart(__cornerPart); 
    58                         this.setWidth(__w); 
    59                         this.setHeight(__h); 
    60                         this.setColor(__color); 
    61                 } 
    62                 // ===================================================================// 
    63                 // コンポーネント定数からの変更を反映させるsetter/getter 
    64                 // ===================================================================// 
     60                        this.cornerPart = __cornerPart; 
     61                        this.width      = __w; 
     62                        this.height     = __h; 
     63                        this.color      = __color; 
     64                        this.borderSize = __borderSize; 
     65                } 
     66                // -------------------------------------------------------------------// 
     67                // setter 
     68                // -------------------------------------------------------------------// 
    6569                [Inspectable(defaultValue="#000000", name="01.色", type="Color")] 
    6670                public function set color(_num:uint){ 
    67                         setColor(_num); 
    68                 } 
    69                 public function get color():uint{ 
    70                         return __color; 
    71                 } 
    72                 // -------------------------------------------------------------------// 
    73                 [Inspectable(defaultValue=5, name="02.角の丸み", type="Number")] 
    74                 public function set cornerSize(_num:Number){ 
    75                         setCornerSize(_num); 
    76                 } 
    77                 public function get cornerSize():Number{ 
    78                         return __cornerSize; 
    79                 } 
    80                 // -------------------------------------------------------------------// 
    81                 [Inspectable(defaultValue=2, name="03.線の太さ", type="Number")] 
    82                 public function set borderSize(_num:Number){ 
    83                         setBorderSize(_num); 
    84                 } 
    85                 public function get borderSize():Number{ 
    86                         return __borderSize; 
    87                 } 
    88                 // -------------------------------------------------------------------// 
    89                 [Inspectable(defaultValue="All", name="04.角の丸め位置", type="List", enumeration="All,Top,Bottom,Left,Right,LT,LB,RT,RB,None")] 
    90                 public function set cornerPart(_str:String){ 
    91                         setCornerPart(_str); 
    92                 } 
    93                 public function get cornerPart():String{ 
    94                         return __cornerPart; 
    95                 } 
    96                 // ===================================================================// 
    97                 // width/heightのオーバーライド 
    98                 // ===================================================================// 
    99                 public override function get width():Number{ 
    100                         return __w; 
    101                 } 
     71                        __color = _num; 
     72                        var _objs:Array = ["LT","RT","LB","RB","T","B","L","R"]; 
     73                        for(var i=0;i < _objs.length;i++){ 
     74                                var colorTransform:ColorTransform = this[_objs[i]].transform.colorTransform; 
     75                                colorTransform.color = _num; 
     76                                this[_objs[i]].transform.colorTransform = colorTransform; 
     77                        } 
     78                } 
     79                // -------------------------------------------------------------------// 
    10280                public override function set width(_num:Number):void{ 
    103                         //super.width = _num;//superで元のwidthの挙動をさせておく(不要っぽい) 
    104                         setWidth(_num); 
    105                 } 
    106                 // -------------------------------------------------------------------// 
    107                 public override function get height():Number{ 
    108                         return __h; 
    109                 } 
    110                 // -------------------------------------------------------------------// 
    111                 public override function set height(_num:Number):void{ 
    112                         //super.height = _num;//superで元のheightの挙動をさせておく(不要っぽい) 
    113                         setHeight(_num); 
    114                 } 
    115                 // ===================================================================// 
    116                 // 通常のgetter/setter 
    117                 // ===================================================================// 
    118                 // getter 
    119                 // -------------------------------------------------------------------// 
    120                 public function getWidth():Number{ 
    121                         return this.__w; 
    122                 } 
    123                 // -------------------------------------------------------------------// 
    124                 public function getHeight():Number{ 
    125                         return this.__h; 
    126                 } 
    127                 // -------------------------------------------------------------------// 
    128                 public function getColor():uint{ 
    129                         return this.__color; 
    130                 } 
    131                 // -------------------------------------------------------------------// 
    132                 public function getCornerSize():Number{ 
    133                         return this.__cornerSize; 
    134                 } 
    135                 // -------------------------------------------------------------------// 
    136                 public function getBorderSize():Number{ 
    137                         return this.__borderSize; 
    138                 } 
    139                 // -------------------------------------------------------------------// 
    140                 public function getCornerPart():String{ 
    141                         return this.__cornerPart; 
    142                 } 
    143                 // -------------------------------------------------------------------// 
    144                 // setter 
    145                 // -------------------------------------------------------------------// 
    146                 public function setWidth(_num:Number){ 
    14781                        // 設定値と角の丸みに矛盾が出る場合は丸みを補正する 
    14882                        if (__cornerSize*2 > _num) { 
    149                                 this.setCornerSize(_num/2)
     83                                this.cornerSize = _num/2
    15084                        } 
    15185                        this.__w = _num; 
     
    15589                        this["RT"].x = _num-__cornerSize; 
    15690                        this["RB"].x = _num-__cornerSize; 
    157                         this.setCornerSize(__cornerSize)
    158                 } 
    159                 // -------------------------------------------------------------------// 
    160                 public function setHeight(_num:Number)
     91                        cornerSize = __cornerSize
     92                } 
     93                // -------------------------------------------------------------------// 
     94                public override function set height(_num:Number):void
    16195                        // 設定値と角の丸みに矛盾が出る場合は丸みを補正する 
    16296                        if (__cornerSize*2 > _num) { 
    163                                 this.setCornerSize(_num/2)
     97                                this.cornerSize = _num/2
    16498                        } 
    16599                        this.__h = _num; 
     
    167101                        this["R"].height = _num-(__cornerSize*2); 
    168102                        this["B"].y = _num; 
    169                         this["LB"].y = this["L"]._height+this["L"].y; 
    170                         this["RB"].y = this["R"]._height+this["R"].y; 
    171                         this.setCornerSize(__cornerSize); 
    172                 } 
    173                 // -------------------------------------------------------------------// 
    174                 public function setColor(_num:uint){ 
    175                         __color = _num; 
    176                         var _objs:Array = ["LT","RT","LB","RB","T","B","L","R"]; 
    177                         for(var i=0;i < _objs.length;i++){ 
    178                                 var colorTransform:ColorTransform = this[_objs[i]].transform.colorTransform; 
    179                                 colorTransform.color = _num; 
    180                                 this[_objs[i]].transform.colorTransform = colorTransform; 
    181                         } 
    182                 } 
    183                 // -------------------------------------------------------------------// 
    184                 public function setCornerSize(_num:Number){ 
     103                        this["LB"].y = this["L"].height+this["L"].y; 
     104                        this["RB"].y = this["R"].height+this["R"].y; 
     105                        this.cornerSize = __cornerSize; 
     106                } 
     107                // -------------------------------------------------------------------// 
     108                [Inspectable(defaultValue=5, name="02.角の丸み", type="Number")] 
     109                public function set cornerSize(_num:Number){ 
    185110                         
    186111                        // 設定値と角の丸みに矛盾が出る場合は適正値に戻す 
     
    198123                        this["LT"].x = _num; 
    199124                        this["LT"].y = _num; 
    200                         this["RT"].x = this.getWidth()-_num; 
     125                        this["RT"].x = __w-_num; 
    201126                        this["RT"].y = _num; 
    202127                        this["LB"].x = _num; 
    203                         this["LB"].y = this.getHeight()-_num; 
    204                         this["RB"].x = this.getWidth()-_num; 
    205                         this["RB"].y = this.getHeight()-_num; 
     128                        this["LB"].y = __h-_num; 
     129                        this["RB"].x = __w-_num; 
     130                        this["RB"].y = __h-_num; 
    206131                        this["LT"].visible = __cornerPartEnabled.LT; 
    207132                        this["RT"].visible = __cornerPartEnabled.RT; 
     
    210135                        this["T"].x = 0; 
    211136                        this["B"].x = 0; 
    212                         this["T"].width = this.getWidth(); 
    213                         this["B"].width = this.getWidth(); 
     137                        this["T"].width = this.width; 
     138                        this["B"].width = this.width; 
     139                        this["L"].x = 0; 
    214140                        this["L"].y = 0; 
    215141                        this["R"].y = 0; 
    216                         this["L"].height = this.getHeight()
    217                         this["R"].height = this.getHeight()
     142                        this["L"].height = this.height
     143                        this["R"].height = this.height
    218144                        if(__cornerPartEnabled.LT){ 
    219145                                this["L"].height-= _num; 
     
    238164                } 
    239165                // -------------------------------------------------------------------// 
    240                 public function setBorderSize(_num:Number){ 
     166                [Inspectable(defaultValue=2, name="03.線の太さ", type="Number")] 
     167                public function set borderSize(_num:Number){ 
    241168                        // 設定値と角の丸みに矛盾が出る場合は適正値に戻す 
    242169                        var _max = (this.__w > this.__h) ? this.__h:this.__w; 
     
    253180                        this["T"].height = _num; 
    254181                        this["B"].height = _num; 
    255                         this.setCornerSize(__cornerSize)
    256                          
    257                         //BorderSizeが0(非表示)の場合は四つ角のalpha値を0にしておく 
     182                        this.cornerSize = __cornerSize
     183                         
     184                        //BorderSizeが0(非表示)の場合は四つ角を非表示にしておく 
    258185                        if(_num == 0){ 
    259                                 this["LT"].alpha = 0
    260                                 this["RT"].alpha = 0
    261                                 this["LB"].alpha = 0
    262                                 this["RB"].alpha = 0
     186                                this["LT"].visible = false
     187                                this["RT"].visible = false
     188                                this["LB"].visible = false
     189                                this["RB"].visible = false
    263190                        }else{ 
    264                                 this["LT"].alpha = 100; 
    265                                 this["RT"].alpha = 100; 
    266                                 this["LB"].alpha = 100; 
    267                                 this["RB"].alpha = 100; 
    268                         } 
    269                 } 
    270                 // -------------------------------------------------------------------// 
    271                 public function setCornerPart(_str:String) { 
     191                                this["LT"].visible = true; 
     192                                this["RT"].visible = true; 
     193                                this["LB"].visible = true; 
     194                                this["RB"].visible = true; 
     195                        } 
     196                } 
     197                // -------------------------------------------------------------------// 
     198                [Inspectable(defaultValue="All", name="04.角の丸め位置", type="List", enumeration="All,Top,Bottom,Left,Right,LT,LB,RT,RB,None")] 
     199                public function set cornerPart(_str:String) { 
    272200                        this.__cornerPart = _str; 
    273201                        this.__cornerPartEnabled = new Object(); 
     
    334262                                break; 
    335263                        } 
    336                         this.setCornerSize(__cornerSize); 
     264                        this.cornerSize = __cornerSize; 
     265                } 
     266                // ===================================================================// 
     267                // getter 
     268                // ===================================================================// 
     269                public override function get width():Number{ 
     270                        return __w; 
     271                } 
     272                // -------------------------------------------------------------------// 
     273                public override function get height():Number{ 
     274                        return __h; 
     275                } 
     276                // -------------------------------------------------------------------// 
     277                public function get color():uint{ 
     278                        return this.__color; 
     279                } 
     280                // -------------------------------------------------------------------// 
     281                public function get cornerSize():Number{ 
     282                        return this.__cornerSize; 
     283                } 
     284                // -------------------------------------------------------------------// 
     285                public function get borderSize():Number{ 
     286                        return this.__borderSize; 
     287                } 
     288                // -------------------------------------------------------------------// 
     289                public function get cornerPart():String{ 
     290                        return this.__cornerPart; 
    337291                } 
    338292                // -------------------------------------------------------------------// 
  • mxp/specialbutton/as3/src/ButtonBox.as

    r1450 r1522  
    5555                        outer.width = __w; 
    5656                        inner.width = __w-(__outerSize); 
    57                         mask_mc.width = __w
     57                        mask_mc.width = __w-(__outerSize*2)
    5858                        body_mc.width = __w-(__outerSize*2); 
    5959                        body_mc.x = __outerSize; 
     60                        cornerSize = __cornerSize; 
    6061                } 
    6162                // -------------------------------------------------------------------// 
     
    6465                        outer.height = __h; 
    6566                        inner.height = __h-(__outerSize); 
    66                         mask_mc.height = __h
     67                        mask_mc.height = __h-(__outerSize*2)
    6768                        body_mc.height = __h-(__outerSize*2); 
    6869                        body_mc.y = __outerSize; 
     70                        cornerSize = __cornerSize; 
    6971                } 
    7072                // -------------------------------------------------------------------// 
     
    7476                        outer.cornerSize = _num; 
    7577                        inner.cornerSize = _num-(__outerSize/2); 
    76                         mask_mc.cornerSize = _num; 
     78                        outerSize = __outerSize; 
     79                        mask_mc.cornerSize = _num-(__outerSize); 
     80                        mask_mc.cornerPart = "All"; 
     81                        mask_mc.cornerPart = __cornerPart; 
    7782                } 
    7883                // -------------------------------------------------------------------// 
     
    8287                        outer.borderSize = _num; 
    8388                        innerPosition = __innerPosition; 
     89                         
     90                        mask_mc.x = _num; 
     91                        mask_mc.y = _num; 
     92                        mask_mc.width = __w-(outer.borderSize*2); 
     93                        mask_mc.height = __h-(outer.borderSize*2); 
     94                        mask_mc.cornerSize = cornerSize-(_num); 
     95                        mask_mc.cornerPart = "All"; 
     96                        mask_mc.cornerPart = __cornerPart; 
    8497                } 
    8598                // -------------------------------------------------------------------// 
  • mxp/specialbutton/as3/src/buttonBox_Labels.as

    r1491 r1522  
    2727                public var __bold                               :Boolean = false; 
    2828                public var __italic                             :Boolean = false; 
     29                public var __underline                  :Boolean = false; 
    2930                public var __shadowMargin_x             :Number = 1; 
    3031                public var __shadowMargin_y             :Number = 1; 
     
    203204                } 
    204205                // -------------------------------------------------------------------// 
     206                public function set underline(_bool:Boolean):void { 
     207                        txtLabel_mc.underline = _bool; 
     208                } 
     209                // -------------------------------------------------------------------// 
    205210                public function set shadowMargin(_nums:Array) { 
    206211                        txtLabel_mc.shadowMargin = _nums; 
     
    292297                public function get italic():Boolean { 
    293298                        return txtLabel_mc.italic; 
     299                } 
     300                // -------------------------------------------------------------------// 
     301                public function get underline():Boolean { 
     302                        return txtLabel_mc.underline; 
    294303                } 
    295304                // -------------------------------------------------------------------// 
  • mxp/specialbutton/as3/src/buttonBox_textLabels.as

    r1491 r1522  
    8080                } 
    8181                // -------------------------------------------------------------------// 
     82                public function set underline(_bool:Boolean):void { 
     83                        __underline = _bool; 
     84                        updateText(); 
     85                } 
     86                // -------------------------------------------------------------------// 
    8287                public function set shadowMargin(_nums:Array) { 
    8388                        __shadowMargin_x = _nums[0]; 
     
    141146                public function get italic():Boolean { 
    142147                        return __italic; 
     148                } 
     149                // -------------------------------------------------------------------// 
     150                public function get underline():Boolean { 
     151                        return __underline; 
    143152                } 
    144153                // -------------------------------------------------------------------// 
  • mxp/specialbutton/as3/src/sample.txt

    r1491 r1522  
    11 
    22■不具合の残りリスト 
    3  Cornerにアルファが通用していない(ジャスト0はなぜか大丈夫) 
    4  Cornerに矛盾が発生するデカい値を入れるとCornerがはみ出して表示される 
     3 Cornerにアルファが通用していない(ジャスト0はなぜか大丈夫)                             〆 
     4 Cornerに矛盾が発生するデカい値を入れるとCornerがはみ出して表示される      〆 
    55 
    66