Skip to content

Commit

Permalink
some minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
lrisviel committed Oct 1, 2018
1 parent e61a5df commit 824edf5
Show file tree
Hide file tree
Showing 14 changed files with 1,220 additions and 429 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
## net file in lfs
*.net
20 changes: 19 additions & 1 deletion client/assets/script/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,12 @@ cc.Class({
if(window.uploading){
return;
}
if(window.controller.logo_node.active){
window.controller.logo_node.active = false;
return;
}
window.controller.welcome_node.active = !window.controller.welcome_node.active;
window.controller.logo_node.active = window.controller.welcome_node.active;
window.controller.logo_node.active = false;
},

on_start: function () {
Expand All @@ -92,6 +96,18 @@ cc.Class({
window.open('http://github.com/lllyasviel/style2paints');
},

onCD: function () {
window.open('https://zhuanlan.zhihu.com/p/36560034');
},

onAlter: function () {
if (window.cnzh) {
this.onCD();
}else{
this.onGithub();
}
},

load_reference_url: function (url, call_back=null) {
window.referenceImageLoader.load_url(url,function (image) {

Expand Down Expand Up @@ -319,6 +335,8 @@ cc.Class({

onLoad: function () {

window.cnzh = false;

window.server_url = 'http://127.0.0.1:8000';
window.server_url = '';

Expand Down
5 changes: 5 additions & 0 deletions client/assets/script/language.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cc.Class({
extends: cc.Component,

chinese: function () {
window.cnzh = true;
console.log("chinese");
var tests = this.getComponentsInChildren("interLabel");
for (var i = 0; i < tests.length; i++) {
Expand All @@ -10,6 +11,7 @@ cc.Class({
},

japanese: function () {
window.cnzh = false;
console.log("japanese");
var tests = this.getComponentsInChildren("interLabel");
for (var i = 0; i < tests.length; i++) {
Expand All @@ -18,6 +20,7 @@ cc.Class({
},

english: function () {
window.cnzh = false;
console.log("english");
var tests = this.getComponentsInChildren("interLabel");
for (var i = 0; i < tests.length; i++) {
Expand All @@ -27,8 +30,10 @@ cc.Class({

onLoad: function () {
this.english();
window.cnzh = false;
if (navigator.language.substring(0,2) == "zh") {
this.chinese();
window.cnzh = true;
}
if (navigator.language.substring(0, 2) == "ja") {
this.japanese();
Expand Down
Loading

0 comments on commit 824edf5

Please sign in to comment.