From 1ca92f09c426b706b66aa2324f8cc1f4b868c720 Mon Sep 17 00:00:00 2001 From: adplantade Date: Wed, 5 Aug 2020 15:59:32 +0200 Subject: [PATCH] ajout du bouton "retour accueil" en jeu --- code/game.css | 46 +++++--------------------------------- code/game.html | 3 +++ code/ress/button_back.png | Bin 0 -> 3326 bytes code/vitraux.js | 14 ++++++------ 4 files changed, 16 insertions(+), 47 deletions(-) create mode 100644 code/ress/button_back.png diff --git a/code/game.css b/code/game.css index 8323e35..ff0a560 100644 --- a/code/game.css +++ b/code/game.css @@ -5,12 +5,6 @@ .all-container { display : flex; justify-content: center; - /* - align-items: baseline; - width : min-content; - flex-direction: row; - flex-wrap: wrap;*/ - } .day { background: #eee; color: black; } @@ -18,57 +12,24 @@ .lightButton { position: absolute; - right: 0px; + right: 5px; } .flex-container { - /* We first create a flex layout context */ display : flex; align-items: baseline; width : min-content; margin: 20px; - /* Then we define the flow direction - and if we allow the items to wrap - * Remember this is the same as: - * flex-direction: row; - * flex-wrap: wrap; - */ - - - /* Then we define how is distributed the remaining space */ flex-direction: column; } - /* - - .flex-item { - padding: 5px; - width: 200px; - height: 150px; - margin-top: 10px; - line-height: 150px; - color: white; - font-weight: bold; - font-size: 3em; - text-align: center; - }*/ .vitraux { - /* We first create a flex layout context */ display : flex; align-items: baseline; width : min-content; margin: 20px; - /* Then we define the flow direction - and if we allow the items to wrap - * Remember this is the same as: - * flex-direction: row; - * flex-wrap: wrap; - */ - - - /* Then we define how is distributed the remaining space */ flex-direction: column; } @@ -116,4 +77,9 @@ font-size: large; font-weight: bold; font-family: 'Segoe print'; + } + + .back { + position: absolute; + bottom: 5px; } \ No newline at end of file diff --git a/code/game.html b/code/game.html index 3ad4e83..a4f6231 100644 --- a/code/game.html +++ b/code/game.html @@ -47,6 +47,9 @@ + + + diff --git a/code/ress/button_back.png b/code/ress/button_back.png new file mode 100644 index 0000000000000000000000000000000000000000..edde128ca9808a0b78cd889554de7a41011e94cc GIT binary patch literal 3326 zcmb`KX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2eor`jFpNFe+5wQUg*ZA`h9c z_1`rJy4AJqFZ%9MvY=Dr3Iy7?Bjs~^nS@)2_fxs_!PNIIES+>@!2K2X#fIvX{(8RI z0AItv&NdfY9VehCqJ4kBK;}L+@}rk^ZtuK*QNLDL^~iseTM;J+xnadTk8L&Fe;8bn zr|9ox@vnHV%1B!mw3zy>o_S9~=tmG(?Xi75qbB`Ff^dEgQsv2=nZJt6XRq0=e8j>i zUAMktJqQ=5w*ouLMYptN4$3z3-9p1eNB92*gGwF{NIv?c!OvwjA}IGGE?4+@?%e<< z-!(2VjdH_JU0+;vFefWo3PU5#vLfMo75=qDf@i9*oESi*$GV!3uV#S zn+a%h3*u|+Q;oRYXJu(53|&}n697jdUQ1hbECpE=eA--^sI7e;_(HU8k1q#xrQ!P( z6Y>IYf1+dxmNsEO&M56d3+beym~Vl?6{GD}HV$`Ws4ut{=)xc*D&ouN+ra@nRR|Oj zn=A%~j4mAGhegF!3KYJ7%7(!MW**%N#mb*3ZB~C=k>ED#(1tDrC#M_VR9+&m(8`uY z-sehe%VKu%H@wv1YLr3VIi25Xe~?uS;{Gbgs<-C&&Yn6J5YkxG}vR$x^m8vxZ3#XCEo43 z=@MbW>Ha(V<^$ie4ez$HF2Vj>;Z4#Zv<+dC4?76yM2Qu} z#Kd!IbYL7l^UVnfp*sQvA`Z9XZN}H~EIw&Z80>~c^-TvpboDfoGwb;FVwldhF5QYm zp%%s?eP1mRj(f%kW@buNVd30Y-9N{fr1h?uA*&)&g}BA|R~X2jOZ{AkI^Fa1w4xG$ zmm-SKR;(v$okb+luqYgB!or`;c2&S1-f+ii^@*rwsKs=e@LE4JMeW_?RHyqkA-AoD;oboe)tt{v(_(QKaFj# f4J%X+K@2#brA?g(y>VLfcL7dW+M}w?y|4Wnrnmet literal 0 HcmV?d00001 diff --git a/code/vitraux.js b/code/vitraux.js index 112ff17..0637da0 100644 --- a/code/vitraux.js +++ b/code/vitraux.js @@ -1,4 +1,3 @@ -//version 28/07 var canvasT = document.getElementById('canvasTotal'); var ctxT = canvasT.getContext('2d'); @@ -65,6 +64,8 @@ canvasO.width=size; canvasT.height=size; canvasO.height=size; +document.getElementById("btn_back").width=size; + for(var a=1;a<5;a++) { eval("var canvas"+ a +"= document.getElementById('canvas"+a+"')"); @@ -675,13 +676,12 @@ function mlManager(e) { document.getElementById(e.currentTarget.id).classList.remove('vitrail-hover'); } +function index() +{ + window.location.replace("./"); +} + genVitraux(); -/* -tab1.push(true,[-3,-3,colors[0]],[-3,2,colors[1]],[1,2,colors[2]],[3,-3,colors[3]]); -tab2.push(true,[-3,-3,colors[0]],[-3,2,colors[1]],[1,2,colors[2]],[3,-3,colors[3]]); -tab3.push(true,[-3,-3,colors[0]],[-3,2,colors[1]],[1,2,colors[2]],[3,-3,colors[3]]); -tab4.push(true,[-3,-3,colors[0]],[-3,2,colors[1]],[1,2,colors[2]],[3,-3,colors[3]]); -*/ toutDessiner(tab1,canvas1,ctx1); toutDessiner(tab2,canvas2,ctx2);