diff options
-rw-r--r-- | js/dungeon.js | 8 | ||||
-rw-r--r-- | js/shop.js | 8 |
2 files changed, 7 insertions, 9 deletions
diff --git a/js/dungeon.js b/js/dungeon.js index d20a3cf..4fb226d 100644 --- a/js/dungeon.js +++ b/js/dungeon.js @@ -8,7 +8,7 @@ function buildDungeon(){ function displayDungeon(){ var tmphtml = "<br/>"; - tmphtml += "<button id=\"launch\" type=\"button\" class=\"btn btn-primary\" onclick=\"launchDungeon()\">Launch</button>"; + tmphtml += "<button id=\"launch\" type=\"button\" class=\"btn btn-success\" onclick=\"launchDungeon()\">Launch</button>"; document.getElementById("tab4").innerHTML = tmphtml; } @@ -24,13 +24,13 @@ function displayBattle(ret){ tmphtml += "<h4>Battle</h4>"; tmphtml += "<ul class=\"list-inline\">"; tmphtml += "<li>"; - tmphtml += "<button type=\"button\" class=\"btn btn-primary\" style=\"margin-left:30px;\"><span class=\"item-icon\">" + data.icon + "</span><br />" + data.name + "<br/> lv: " + data.level + " <span id=\"lifeMob\">hp: " + data.hp + "</span></button>"; - tmphtml += "<button type=\"button\" class=\"btn btn-primary\" style=\"margin-left:30px;\"><span class=\"item-icon\">" + ret[0].icon + "</span><br />" + ret[0].name + "<br/> lv: " + ret[0].level + " <span id=\"lifeMob\">hp: " + ret[0].hp + "</span></button>"; + tmphtml += "<button type=\"button\" class=\"btn btn-success\" style=\"margin-left:30px;\"><span class=\"item-icon\">" + data.icon + "</span><br />" + data.name + "<br/> lv: " + data.level + " <span id=\"lifeMob\">hp: " + data.hp + "</span></button>"; + tmphtml += "<button type=\"button\" class=\"btn btn-success\" style=\"margin-left:30px;\"><span class=\"item-icon\">" + ret[0].icon + "</span><br />" + ret[0].name + "<br/> lv: " + ret[0].level + " <span id=\"lifeMob\">hp: " + ret[0].hp + "</span></button>"; tmphtml += "</li>"; tmphtml += "</ul>"; tmphtml += "</div>"; tmphtml += "<br/><br/>"; - tmphtml += "<button type=\"button\" class=\"btn btn-primary\" onclick=\"exitDungeon()\">Exit</button>"; + tmphtml += "<button type=\"button\" class=\"btn btn-success\" onclick=\"exitDungeon()\">Exit</button>"; document.getElementById("tab4").innerHTML = tmphtml; } @@ -3,16 +3,14 @@ function displayShop(ret) { for(var key in ret.items){ if(ret.items.hasOwnProperty(key)){ var category = ret.items[key]; - tmphtml += "<div class=\"row\">"; tmphtml += "<h4>"+key+"</h4>"; tmphtml += "<ul class=\"list-inline\">"; for(var i=0; i < category.length; i++) { tmphtml += "<li>"; - tmphtml += "<button type=\"button\" class=\"btn btn-primary\" onclick=\"buyItem('" + category[i].name + "')\"><span class=\"item-icon\">" + category[i].icon + "</span><br />" + category[i].name + "</button>"; + tmphtml += "<button type=\"button\" class=\"btn btn-success\" onclick=\"buyItem('" + category[i].name + "')\"><span class=\"item-icon\">" + category[i].icon + "</span><br />" + category[i].name + "</button>"; tmphtml += "</li>"; } tmphtml += "</ul>"; - tmphtml += "</div>"; } } document.getElementById("tab2").innerHTML = tmphtml; @@ -37,7 +35,7 @@ function addItem(ret) { var itemtag = document.querySelector("[data-name=\""+ret[0].name+"\"]"); if(!itemtag){ //si c'est la première itération de l'objet itemhtml += "<li>"; - itemhtml += "<button type=\"button\" class=\"btn btn-primary\" onclick=\"useItem('" + ret[0].name + "')\"><span class=\"item-icon\">" + ret[0].icon + "</span><br />" + ret[0].name + "(<span data-name=\""+ ret[0].name + "\">"+ret[1]+"</span>)</button>"; + itemhtml += "<button type=\"button\" class=\"btn btn-success\" onclick=\"useItem('" + ret[0].name + "')\"><span class=\"item-icon\">" + ret[0].icon + "</span><br />" + ret[0].name + "(<span data-name=\""+ ret[0].name + "\">"+ret[1]+"</span>)</button>"; itemhtml += "</li>"; } else{ // si c'est une n-ième itération @@ -48,7 +46,7 @@ function addItem(ret) { if(invcontent.children.length <= 1) { - var tmphtml = "<h4>Your bag contains the following items:</h4>"; + var tmphtml = "<h3>Your bag contains the following items:</h3>"; tmphtml += "<ul class=\"list-inline\">"; tmphtml += itemhtml; tmphtml += "</ul>" |