control
This commit is contained in:
parent
b991e6707c
commit
22dcf80004
|
@ -89,7 +89,7 @@ game.import('play',function(){
|
||||||
boss_shihuosuanni:['male','wei',3,['boss_jiguan','boss_lianyujg'],['jiangemech','hiddenboss','bossallowed'],'wei'],
|
boss_shihuosuanni:['male','wei',3,['boss_jiguan','boss_lianyujg'],['jiangemech','hiddenboss','bossallowed'],'wei'],
|
||||||
boss_lieshiyazi:['male','wei',4,['boss_jiguan','boss_nailuo'],['jiangemech','hiddenboss','bossallowed'],'wei'],
|
boss_lieshiyazi:['male','wei',4,['boss_jiguan','boss_nailuo'],['jiangemech','hiddenboss','bossallowed'],'wei'],
|
||||||
}
|
}
|
||||||
if(get.mode()!='versus'){
|
if(get.mode()!='versus'||get.config('versus_mode')!='jiange'){
|
||||||
lib.characterPack.mode_extension_jiange=list2;
|
lib.characterPack.mode_extension_jiange=list2;
|
||||||
for(var i in list2){
|
for(var i in list2){
|
||||||
lib.characterPack.mode_extension_jiange[i]=list2[i];
|
lib.characterPack.mode_extension_jiange[i]=list2[i];
|
||||||
|
|
20
game/game.js
20
game/game.js
|
@ -18461,6 +18461,9 @@
|
||||||
ui.refresh(this);
|
ui.refresh(this);
|
||||||
this.style.transition='';
|
this.style.transition='';
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
this.animate('controlpressdownx',500);
|
||||||
|
}
|
||||||
ui.updatec();
|
ui.updatec();
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -18472,6 +18475,8 @@
|
||||||
node.addEventListener(lib.config.touchscreen?'touchend':'click',ui.click.control);
|
node.addEventListener(lib.config.touchscreen?'touchend':'click',ui.click.control);
|
||||||
},
|
},
|
||||||
close:function(){
|
close:function(){
|
||||||
|
this.animate('controlpressdownx',500);
|
||||||
|
|
||||||
ui.controls.remove(this);
|
ui.controls.remove(this);
|
||||||
this.delete();
|
this.delete();
|
||||||
|
|
||||||
|
@ -18484,6 +18489,8 @@
|
||||||
if(ui.skills3==this) delete ui.skills3;
|
if(ui.skills3==this) delete ui.skills3;
|
||||||
},
|
},
|
||||||
replace:function(){
|
replace:function(){
|
||||||
|
// this.animate('controlpressdownx',500);
|
||||||
|
|
||||||
while(this.childNodes.length) this.firstChild.remove();
|
while(this.childNodes.length) this.firstChild.remove();
|
||||||
var i,controls;
|
var i,controls;
|
||||||
if(get.objtype(arguments[0])=='array') controls=arguments[0];
|
if(get.objtype(arguments[0])=='array') controls=arguments[0];
|
||||||
|
@ -34314,6 +34321,7 @@
|
||||||
if(control.childNodes.length){
|
if(control.childNodes.length){
|
||||||
// if(nozoom||true){
|
// if(nozoom||true){
|
||||||
control.style.transition='opacity 0.5s';
|
control.style.transition='opacity 0.5s';
|
||||||
|
control.animate('controlpressdownx',500);
|
||||||
// }
|
// }
|
||||||
// else{
|
// else{
|
||||||
// control.style.transition='';
|
// control.style.transition='';
|
||||||
|
@ -34334,14 +34342,12 @@
|
||||||
control.addEventListener(lib.config.touchscreen?'touchstart':'mousedown',function(){
|
control.addEventListener(lib.config.touchscreen?'touchstart':'mousedown',function(){
|
||||||
if(this.classList.contains('disabled')) return;
|
if(this.classList.contains('disabled')) return;
|
||||||
this.classList.add('controlpressdown');
|
this.classList.add('controlpressdown');
|
||||||
this.classList.add('controlpressdownx');
|
|
||||||
if(typeof this._offset=='number'){
|
if(typeof this._offset=='number'){
|
||||||
this.style.transform='translateX('+this._offset+'px) scale(0.97)';
|
this.style.transform='translateX('+this._offset+'px) scale(0.97)';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
control.addEventListener(lib.config.touchscreen?'touchend':'mouseup',function(){
|
control.addEventListener(lib.config.touchscreen?'touchend':'mouseup',function(){
|
||||||
this.classList.remove('controlpressdown');
|
this.classList.remove('controlpressdown');
|
||||||
this.classList.remove('controlpressdownx');
|
|
||||||
if(typeof this._offset=='number'){
|
if(typeof this._offset=='number'){
|
||||||
this.style.transform='translateX('+this._offset+'px)';
|
this.style.transform='translateX('+this._offset+'px)';
|
||||||
}
|
}
|
||||||
|
@ -38471,6 +38477,7 @@
|
||||||
fullwidth+=154;
|
fullwidth+=154;
|
||||||
}
|
}
|
||||||
if(game.layout!='default'&&game.layout!='newlayout'&&ui.arena.offsetWidth/2>=fullwidth){
|
if(game.layout!='default'&&game.layout!='newlayout'&&ui.arena.offsetWidth/2>=fullwidth){
|
||||||
|
var current_offset=stayleft._offset;
|
||||||
if(fullright){
|
if(fullright){
|
||||||
stayleft._offset=Math.ceil(-ui.arena.offsetWidth/2)+135;
|
stayleft._offset=Math.ceil(-ui.arena.offsetWidth/2)+135;
|
||||||
if(game.layout=='long2'&&ui.arena.dataset.number=='8'&&get.mode()!='boss'){
|
if(game.layout=='long2'&&ui.arena.dataset.number=='8'&&get.mode()!='boss'){
|
||||||
|
@ -38480,8 +38487,11 @@
|
||||||
else{
|
else{
|
||||||
stayleft._offset=Math.ceil(-ui.arena.offsetWidth/2)+165;
|
stayleft._offset=Math.ceil(-ui.arena.offsetWidth/2)+165;
|
||||||
}
|
}
|
||||||
|
if(current_offset!=stayleft._offset){
|
||||||
|
stayleft.animate('controlpressdownx',500);
|
||||||
stayleft.style.transform='translateX('+stayleft._offset+'px)';
|
stayleft.style.transform='translateX('+stayleft._offset+'px)';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else{
|
else{
|
||||||
add(stayleft,true);
|
add(stayleft,true);
|
||||||
}
|
}
|
||||||
|
@ -38489,8 +38499,11 @@
|
||||||
if(!controls.length) return;
|
if(!controls.length) return;
|
||||||
var offset=-length/2;
|
var offset=-length/2;
|
||||||
var control=controls.shift();
|
var control=controls.shift();
|
||||||
|
if(control._offset!=offset){
|
||||||
|
control.animate('controlpressdownx',500);
|
||||||
control.style.transform='translateX('+offset+'px)';
|
control.style.transform='translateX('+offset+'px)';
|
||||||
control._offset=offset;
|
control._offset=offset;
|
||||||
|
}
|
||||||
while(controls.length){
|
while(controls.length){
|
||||||
var control=controls.shift();
|
var control=controls.shift();
|
||||||
var width=widths.shift();
|
var width=widths.shift();
|
||||||
|
@ -38498,9 +38511,12 @@
|
||||||
if(get.is.phoneLayout()){
|
if(get.is.phoneLayout()){
|
||||||
offset+=6;
|
offset+=6;
|
||||||
}
|
}
|
||||||
|
if(control._offset!=offset){
|
||||||
|
control.animate('controlpressdownx',500);
|
||||||
control.style.transform='translateX('+offset+'px)';
|
control.style.transform='translateX('+offset+'px)';
|
||||||
control._offset=offset;
|
control._offset=offset;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
updatex:function(){
|
updatex:function(){
|
||||||
ui.update.apply(this,arguments);
|
ui.update.apply(this,arguments);
|
||||||
|
|
|
@ -1070,9 +1070,12 @@ input.fileinput::-webkit-file-upload-button {
|
||||||
#system>div>.pressdown{
|
#system>div>.pressdown{
|
||||||
transform: scale(0.97);
|
transform: scale(0.97);
|
||||||
}
|
}
|
||||||
.controlpressdownx{
|
.control:not(.disabled) {
|
||||||
transition: all 0.1s;
|
transition: all 0.1s;
|
||||||
}
|
}
|
||||||
|
.control:not(.disabled).controlpressdownx {
|
||||||
|
transition: all 0.5s;
|
||||||
|
}
|
||||||
#system>div>.pressdown2{
|
#system>div>.pressdown2{
|
||||||
background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1));
|
background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2425,6 +2425,7 @@ game.import('mode',function(){
|
||||||
}
|
}
|
||||||
},get.config('onlyguozhanexpand')?'expandall':undefined,get.config('onlyguozhan')?'onlypack:mode_guozhan':undefined);
|
},get.config('onlyguozhanexpand')?'expandall':undefined,get.config('onlyguozhan')?'onlypack:mode_guozhan':undefined);
|
||||||
if(ui.cheat2){
|
if(ui.cheat2){
|
||||||
|
ui.cheat2.animate('controlpressdownx',500);
|
||||||
ui.cheat2.classList.remove('disabled');
|
ui.cheat2.classList.remove('disabled');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2447,7 +2448,8 @@ game.import('mode',function(){
|
||||||
game.uncheck();
|
game.uncheck();
|
||||||
game.check();
|
game.check();
|
||||||
if(ui.cheat){
|
if(ui.cheat){
|
||||||
ui.cheat.classList.add('disabled');
|
ui.cheat.animate('controlpressdownx',500);
|
||||||
|
ui.cheat.classList.remove('disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -2462,7 +2464,7 @@ game.import('mode',function(){
|
||||||
game.uncheck();
|
game.uncheck();
|
||||||
game.check();
|
game.check();
|
||||||
if(ui.cheat){
|
if(ui.cheat){
|
||||||
ui.cheat.classList.remove('disabled');
|
ui.cheat.classList.add('disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1024,6 +1024,7 @@ game.import('mode',function(){
|
||||||
lib.onfree.push(function(){
|
lib.onfree.push(function(){
|
||||||
event.dialogxx=ui.create.characterDialog();
|
event.dialogxx=ui.create.characterDialog();
|
||||||
if(ui.cheat2){
|
if(ui.cheat2){
|
||||||
|
ui.cheat2.animate('controlpressdownx',500);
|
||||||
ui.cheat2.classList.remove('disabled');
|
ui.cheat2.classList.remove('disabled');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1045,6 +1046,7 @@ game.import('mode',function(){
|
||||||
game.uncheck();
|
game.uncheck();
|
||||||
game.check();
|
game.check();
|
||||||
if(ui.cheat){
|
if(ui.cheat){
|
||||||
|
ui.cheat.animate('controlpressdownx',500);
|
||||||
ui.cheat.classList.remove('disabled');
|
ui.cheat.classList.remove('disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -597,6 +597,7 @@ game.import('mode',function(){
|
||||||
if(lib.character[name][1]!=game.me.identity) return true;
|
if(lib.character[name][1]!=game.me.identity) return true;
|
||||||
});
|
});
|
||||||
if(ui.cheat2){
|
if(ui.cheat2){
|
||||||
|
ui.cheat2.animate('controlpressdownx',500);
|
||||||
ui.cheat2.classList.remove('disabled');
|
ui.cheat2.classList.remove('disabled');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -619,6 +620,7 @@ game.import('mode',function(){
|
||||||
game.uncheck();
|
game.uncheck();
|
||||||
game.check();
|
game.check();
|
||||||
if(ui.cheat){
|
if(ui.cheat){
|
||||||
|
ui.cheat.animate('controlpressdownx',500);
|
||||||
ui.cheat.classList.remove('disabled');
|
ui.cheat.classList.remove('disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -871,6 +873,7 @@ game.import('mode',function(){
|
||||||
lib.onfree.push(function(){
|
lib.onfree.push(function(){
|
||||||
event.dialogxx=ui.create.characterDialog();
|
event.dialogxx=ui.create.characterDialog();
|
||||||
if(ui.cheat2){
|
if(ui.cheat2){
|
||||||
|
ui.cheat2.animate('controlpressdownx',500);
|
||||||
ui.cheat2.classList.remove('disabled');
|
ui.cheat2.classList.remove('disabled');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -891,7 +894,8 @@ game.import('mode',function(){
|
||||||
game.uncheck();
|
game.uncheck();
|
||||||
game.check();
|
game.check();
|
||||||
if(ui.cheat){
|
if(ui.cheat){
|
||||||
ui.cheat.classList.remove('hidden');
|
ui.cheat.animate('controlpressdownx',500);
|
||||||
|
ui.cheat.classList.remove('disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -906,7 +910,7 @@ game.import('mode',function(){
|
||||||
game.uncheck();
|
game.uncheck();
|
||||||
game.check();
|
game.check();
|
||||||
if(ui.cheat){
|
if(ui.cheat){
|
||||||
ui.cheat.classList.add('hidden');
|
ui.cheat.classList.add('disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue