Selaa lähdekoodia

refactor: add text with paragraph in custom menu

lairaalmas 1 vuosi sitten
vanhempi
commit
e2ff3c7154
2 muutettua tiedostoa jossa 4 lisäystä ja 22 poistoa
  1. 3 21
      src/js/globals/globals_control.js
  2. 1 1
      src/js/menus/menu_custom.js

+ 3 - 21
src/js/globals/globals_control.js

@@ -170,15 +170,9 @@ const gameList = [
           game.add.text(
             x + 5 * offsetW,
             y + offsetH + 50,
-            game.lang.show,
+            game.lang.show + '\n' + game.lang.title,
             textStyles.h4_
           );
-          game.add.text(
-            x + 5 * offsetW,
-            y + offsetH + 80,
-            game.lang.title,
-            textStyles.h2_
-          );
         },
         infoBox: () => ({
           gameMode: {
@@ -323,15 +317,9 @@ const gameList = [
           game.add.text(
             x + 5 * offsetW,
             y + offsetH + 50,
-            game.lang.show,
+            game.lang.show + '\n' + game.lang.title,
             textStyles.h4_
           );
-          game.add.text(
-            x + 5 * offsetW,
-            y + offsetH + 80,
-            game.lang.title,
-            textStyles.h2_
-          );
         },
         infoBox: () => ({
           gameMode: {
@@ -460,13 +448,7 @@ const gameList = [
           game.add.text(
             x + 5 * offsetW,
             y + offsetH + 50,
-            game.lang.show,
-            textStyles.h4_
-          );
-          game.add.text(
-            x + 5 * offsetW + 10,
-            y + offsetH + 80,
-            game.lang.aux_rectangle,
+            game.lang.show + '\n' + game.lang.aux_rectangle,
             textStyles.h4_
           );
         },

+ 1 - 1
src/js/menus/menu_custom.js

@@ -275,7 +275,7 @@ const customMenuState = {
   },
 
   renderCheckBox: function (x, y, offsetW, offsetH) {
-    y += 40;
+    y += 60;
     const frame = showFractions ? 1 : 0;
 
     const selectionBox = game.add.sprite(