diff --git a/assets/arial32.png b/assets/arial32.png new file mode 100755 index 0000000..a04a2ea Binary files /dev/null and b/assets/arial32.png differ diff --git a/assets/arial32.txt b/assets/arial32.txt new file mode 100755 index 0000000..f21a058 --- /dev/null +++ b/assets/arial32.txt @@ -0,0 +1,95 @@ +32 0.00488281 0.00976562 0 0.0625 0 0 0.00878906 +49 0.00976562 0.00976562 0.00292969 0.0175781 0.00878906 0.0449219 0.0175781 +50 0.0234375 0.00976562 0 0.0175781 0.015625 0.0449219 0.0175781 +51 0.0439453 0.00976562 0.000976562 0.0175781 0.015625 0.0449219 0.0175781 +52 0.0644531 0.00976562 0.000976562 0.0175781 0.015625 0.0449219 0.0175781 +53 0.0849609 0.00976562 0.000976562 0.0175781 0.015625 0.0449219 0.0175781 +54 0.105469 0.00976562 0.000976562 0.0175781 0.015625 0.0449219 0.0175781 +55 0.125977 0.00976562 0.00195312 0.0175781 0.0146484 0.0449219 0.0175781 +56 0.145508 0.00976562 0.000976562 0.0175781 0.015625 0.0449219 0.0175781 +57 0.166016 0.00976562 0.000976562 0.0175781 0.015625 0.0449219 0.0175781 +48 0.186523 0.00976562 0.000976562 0.0175781 0.015625 0.0449219 0.0175781 +97 0.207031 0.00976562 0.000976562 0.0292969 0.0146484 0.0332031 0.0166016 +98 0.226562 0.00976562 0.00195312 0.0175781 0.0136719 0.0449219 0.0166016 +99 0.245117 0.00976562 0.000976562 0.0292969 0.0136719 0.0332031 0.015625 +100 0.263672 0.00976562 0.000976562 0.0175781 0.0136719 0.0449219 0.0166016 +101 0.282227 0.00976562 0.000976562 0.0292969 0.0146484 0.0332031 0.0166016 +102 0.301758 0.00976562 0.000976562 0.0175781 0.00976562 0.0449219 0.00976562 +103 0.316406 0.00976562 0 0.0292969 0.0146484 0.0449219 0.0166016 +104 0.335938 0.00976562 0.00195312 0.0175781 0.0136719 0.0449219 0.0175781 +105 0.354492 0.00976562 0.00195312 0.0175781 0.00292969 0.0449219 0.00683594 +106 0.362305 0.00976562 -0.00195312 0.0175781 0.00683594 0.0566406 0.00683594 +107 0.374023 0.00976562 0.00195312 0.0175781 0.0136719 0.0449219 0.015625 +108 0.392578 0.00976562 0.00195312 0.0175781 0.00292969 0.0449219 0.00683594 +109 0.400391 0.00976562 0.00195312 0.0292969 0.0224609 0.0332031 0.0263672 +110 0.427734 0.00976562 0.00195312 0.0292969 0.0136719 0.0332031 0.0175781 +111 0.446289 0.00976562 0.000976562 0.0292969 0.0146484 0.0332031 0.0166016 +112 0.46582 0.00976562 0.00195312 0.0292969 0.0136719 0.0449219 0.0166016 +113 0.484375 0.00976562 0.000976562 0.0273438 0.0136719 0.046875 0.0166016 +114 0.50293 0.00976562 0.00195312 0.0292969 0.00878906 0.0332031 0.0107422 +115 0.516602 0.00976562 0.000976562 0.0292969 0.0136719 0.0332031 0.015625 +116 0.535156 0.00976562 0 0.0175781 0.0078125 0.0449219 0.00878906 +117 0.547852 0.00976562 0.00195312 0.0292969 0.0136719 0.0332031 0.0175781 +118 0.566406 0.00976562 0 0.0292969 0.0146484 0.0332031 0.0146484 +119 0.585938 0.00976562 -0.000976562 0.0292969 0.0244141 0.0332031 0.0224609 +120 0.615234 0.00976562 0 0.0292969 0.0146484 0.0332031 0.0136719 +121 0.634766 0.00976562 0 0.0292969 0.015625 0.0449219 0.0146484 +122 0.655273 0.00976562 0 0.0292969 0.0136719 0.0332031 0.0146484 +65 0.673828 0.00976562 -0.000976562 0.0175781 0.0224609 0.0449219 0.0205078 +66 0.701172 0.00976562 0.00292969 0.0175781 0.0166016 0.0449219 0.0205078 +67 0.722656 0.00976562 0.000976562 0.0175781 0.0205078 0.0449219 0.0224609 +68 0.748047 0.00976562 0.00292969 0.0175781 0.0185547 0.0449219 0.0224609 +69 0.771484 0.00976562 0.00292969 0.0175781 0.015625 0.0449219 0.0205078 +70 0.791992 0.00976562 0.00292969 0.0175781 0.015625 0.0449219 0.0195312 +71 0.8125 0.00976562 0.000976562 0.0175781 0.0214844 0.0449219 0.0244141 +72 0.838867 0.00976562 0.00292969 0.0175781 0.0166016 0.0449219 0.0224609 +73 0.860352 0.00976562 0.00292969 0.0175781 0.00292969 0.0449219 0.00878906 +74 0.868164 0.00976562 0 0.0175781 0.0126953 0.0449219 0.015625 +75 0.885742 0.00976562 0.00292969 0.0175781 0.0185547 0.0449219 0.0205078 +76 0.90918 0.00976562 0.00292969 0.0175781 0.0136719 0.0449219 0.0175781 +77 0.927734 0.00976562 0.00292969 0.0175781 0.0205078 0.0449219 0.0263672 +78 0.953125 0.00976562 0.00292969 0.0175781 0.0166016 0.0449219 0.0224609 +79 0.00488281 0.0820312 0.000976562 0.0175781 0.0224609 0.0449219 0.0244141 +80 0.0322266 0.0820312 0.00292969 0.0175781 0.0166016 0.0449219 0.0205078 +81 0.0537109 0.0820312 0.000976562 0.0175781 0.0224609 0.0488281 0.0244141 +82 0.0810547 0.0820312 0.00292969 0.0175781 0.0185547 0.0449219 0.0224609 +83 0.104492 0.0820312 0.000976562 0.0175781 0.0175781 0.0449219 0.0205078 +84 0.126953 0.0820312 0 0.0175781 0.0185547 0.0449219 0.0185547 +85 0.150391 0.0820312 0.00292969 0.0175781 0.0166016 0.0449219 0.0224609 +86 0.171875 0.0820312 -0.000976562 0.0175781 0.0224609 0.0449219 0.0205078 +87 0.199219 0.0820312 0 0.0175781 0.0302734 0.0449219 0.03125 +88 0.234375 0.0820312 0 0.0175781 0.0205078 0.0449219 0.0205078 +89 0.259766 0.0820312 0 0.0175781 0.0205078 0.0449219 0.0205078 +90 0.285156 0.0820312 0 0.0175781 0.0185547 0.0449219 0.0195312 +46 0.308594 0.0820312 0.00292969 0.0566406 0.00292969 0.00585938 0.00878906 +44 0.316406 0.0820312 0.00292969 0.0566406 0.00292969 0.015625 0.00878906 +58 0.324219 0.0820312 0.00292969 0.0292969 0.00292969 0.0332031 0.00878906 +59 0.332031 0.0820312 0.00292969 0.0292969 0.00292969 0.0429688 0.00878906 +64 0.339844 0.0820312 0.00195312 0.0175781 0.0292969 0.0585938 0.03125 +35 0.374023 0.0820312 0 0.0175781 0.0166016 0.0449219 0.0175781 +36 0.395508 0.0820312 0.000976562 0.015625 0.015625 0.0527344 0.0175781 +37 0.416016 0.0820312 0.00195312 0.0175781 0.0234375 0.0449219 0.0273438 +94 0.444336 0.0820312 0.000976562 0.0175781 0.0117188 0.0234375 0.0136719 +38 0.460938 0.0820312 0.000976562 0.0175781 0.0185547 0.0449219 0.0205078 +42 0.484375 0.0820312 0.000976562 0.0175781 0.00976562 0.0195312 0.0117188 +33 0.499023 0.0820312 0.00390625 0.0175781 0.00292969 0.0449219 0.0107422 +63 0.506836 0.0820312 0.000976562 0.0175781 0.015625 0.0449219 0.0175781 +40 0.527344 0.0820312 0.00195312 0.0175781 0.0078125 0.0566406 0.0107422 +41 0.540039 0.0820312 0.000976562 0.0175781 0.0078125 0.0566406 0.0107422 +91 0.552734 0.0820312 0.00195312 0.0175781 0.00585938 0.0566406 0.00878906 +93 0.563477 0.0820312 0.000976562 0.0175781 0.00585938 0.0566406 0.00878906 +123 0.574219 0.0820312 0.000976562 0.0175781 0.00878906 0.0566406 0.0107422 +125 0.587891 0.0820312 0.000976562 0.0175781 0.00878906 0.0566406 0.0107422 +60 0.601562 0.0820312 0.00195312 0.0253906 0.0146484 0.0292969 0.0185547 +62 0.621094 0.0820312 0.00195312 0.0253906 0.0146484 0.0292969 0.0185547 +95 0.640625 0.0820312 -0.000976562 0.0683594 0.0185547 0.00585938 0.0175781 +45 0.664062 0.0820312 0.000976562 0.0429688 0.00878906 0.00585938 0.0107422 +43 0.677734 0.0820312 0.00195312 0.0253906 0.0146484 0.0292969 0.0185547 +61 0.697266 0.0820312 0.00195312 0.0292969 0.0146484 0.0195312 0.0185547 +124 0.716797 0.0820312 0.00292969 0.0175781 0.00195312 0.0585938 0.0078125 +92 0.723633 0.0820312 0 0.0175781 0.00976562 0.0449219 0.00878906 +47 0.738281 0.0820312 0 0.0175781 0.00976562 0.0449219 0.00878906 +126 0.75293 0.0820312 0.000976562 0.0351562 0.015625 0.0117188 0.0185547 +96 0.773438 0.0820312 0.000976562 0.0175781 0.00585938 0.0078125 0.0107422 +34 0.78418 0.0820312 0.000976562 0.0175781 0.00878906 0.015625 0.0107422 +39 0.797852 0.0820312 0.000976562 0.0175781 0.00292969 0.015625 0.00585938 diff --git a/assets/gui_alex.json b/assets/gui_alex.json index 51c9245..98ad6ce 100755 --- a/assets/gui_alex.json +++ b/assets/gui_alex.json @@ -20,9 +20,9 @@ "name": "backButton", "width": 60, "height": 40, - "background": "showBothModesButton_normal.png", - "pressedDrawable": "showBothModesButton_pressed.png", - "hoverDrawable": "showBothModesButton_selected.png" + "background": "back_btn.png", + "pressedDrawable": "back_btn.png", + "hoverDrawable": "back_btn.png" }] }] }] diff --git a/assets/lucon12.png b/assets/lucon12.png new file mode 100755 index 0000000..eab958d Binary files /dev/null and b/assets/lucon12.png differ diff --git a/assets/lucon12.txt b/assets/lucon12.txt new file mode 100755 index 0000000..c577d21 --- /dev/null +++ b/assets/lucon12.txt @@ -0,0 +1,95 @@ +32 0.00976562 0.0195312 0 0.046875 0 0 0.0136719 +49 0.0195312 0.0195312 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +50 0.0390625 0.0195312 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +51 0.0585938 0.0195312 0.00195312 0.015625 0.0078125 0.03125 0.0136719 +52 0.0761719 0.0195312 0 0.015625 0.0117188 0.03125 0.0136719 +53 0.0976562 0.0195312 0.00195312 0.015625 0.0078125 0.03125 0.0136719 +54 0.115234 0.0195312 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +55 0.134766 0.0195312 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +56 0.154297 0.0195312 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +57 0.173828 0.0195312 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +48 0.193359 0.0195312 0 0.015625 0.0117188 0.03125 0.0136719 +97 0.214844 0.0195312 0.00195312 0.0234375 0.0117188 0.0234375 0.0136719 +98 0.236328 0.0195312 0.00195312 0.0117188 0.00976562 0.0351562 0.0136719 +99 0.255859 0.0195312 0.00195312 0.0234375 0.00976562 0.0234375 0.0136719 +100 0.275391 0.0195312 0.00195312 0.0117188 0.00976562 0.0351562 0.0136719 +101 0.294922 0.0195312 0.00195312 0.0234375 0.00976562 0.0234375 0.0136719 +102 0.314453 0.0195312 0 0.0117188 0.0117188 0.0351562 0.0136719 +103 0.335938 0.0195312 0.00195312 0.0234375 0.00976562 0.03125 0.0136719 +104 0.355469 0.0195312 0.00195312 0.0117188 0.00976562 0.0351562 0.0136719 +105 0.375 0.0195312 0.00195312 0.0117188 0.00585938 0.0351562 0.0136719 +106 0.390625 0.0195312 0.00195312 0.0117188 0.0078125 0.0429688 0.0136719 +107 0.408203 0.0195312 0.00195312 0.0117188 0.0117188 0.0351562 0.0136719 +108 0.429688 0.0195312 0.00195312 0.0117188 0.00585938 0.0351562 0.0136719 +109 0.445312 0.0195312 0 0.0234375 0.0136719 0.0234375 0.0136719 +110 0.46875 0.0195312 0.00195312 0.0234375 0.00976562 0.0234375 0.0136719 +111 0.488281 0.0195312 0 0.0234375 0.0117188 0.0234375 0.0136719 +112 0.509766 0.0195312 0.00195312 0.0234375 0.00976562 0.03125 0.0136719 +113 0.529297 0.0195312 0.00195312 0.0234375 0.00976562 0.03125 0.0136719 +114 0.548828 0.0195312 0.00195312 0.0234375 0.00976562 0.0234375 0.0136719 +115 0.568359 0.0195312 0.00195312 0.0234375 0.00976562 0.0234375 0.0136719 +116 0.587891 0.0195312 0 0.015625 0.0117188 0.03125 0.0136719 +117 0.609375 0.0195312 0.00195312 0.0234375 0.00976562 0.0234375 0.0136719 +118 0.628906 0.0195312 0 0.0234375 0.0136719 0.0234375 0.0136719 +119 0.652344 0.0195312 0 0.0234375 0.0136719 0.0234375 0.0136719 +120 0.675781 0.0195312 0 0.0234375 0.0117188 0.0234375 0.0136719 +121 0.697266 0.0195312 0 0.0234375 0.0117188 0.03125 0.0136719 +122 0.71875 0.0195312 0 0.0234375 0.0117188 0.0234375 0.0136719 +65 0.740234 0.0195312 0 0.015625 0.0136719 0.03125 0.0136719 +66 0.763672 0.0195312 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +67 0.783203 0.0195312 0 0.015625 0.0117188 0.03125 0.0136719 +68 0.804688 0.0195312 0 0.015625 0.0117188 0.03125 0.0136719 +69 0.826172 0.0195312 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +70 0.845703 0.0195312 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +71 0.865234 0.0195312 0 0.015625 0.0117188 0.03125 0.0136719 +72 0.886719 0.0195312 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +73 0.90625 0.0195312 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +74 0.925781 0.0195312 0 0.015625 0.00976562 0.03125 0.0136719 +75 0.945312 0.0195312 0.00195312 0.015625 0.0117188 0.03125 0.0136719 +76 0.966797 0.0195312 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +77 0.00976562 0.0859375 0 0.015625 0.0117188 0.03125 0.0136719 +78 0.03125 0.0859375 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +79 0.0507812 0.0859375 0 0.015625 0.0117188 0.03125 0.0136719 +80 0.0722656 0.0859375 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +81 0.0917969 0.0859375 0 0.015625 0.0136719 0.0390625 0.0136719 +82 0.115234 0.0859375 0.00195312 0.015625 0.0117188 0.03125 0.0136719 +83 0.136719 0.0859375 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +84 0.15625 0.0859375 0 0.015625 0.0136719 0.03125 0.0136719 +85 0.179688 0.0859375 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +86 0.199219 0.0859375 0 0.015625 0.0136719 0.03125 0.0136719 +87 0.222656 0.0859375 0 0.015625 0.0136719 0.03125 0.0136719 +88 0.246094 0.0859375 0 0.015625 0.0136719 0.03125 0.0136719 +89 0.269531 0.0859375 0 0.015625 0.0136719 0.03125 0.0136719 +90 0.292969 0.0859375 0 0.015625 0.0117188 0.03125 0.0136719 +46 0.314453 0.0859375 0.00390625 0.0390625 0.00390625 0.0078125 0.0136719 +44 0.328125 0.0859375 0.00585938 0.0390625 0.00390625 0.015625 0.0136719 +58 0.341797 0.0859375 0.00585938 0.0234375 0.00390625 0.0234375 0.0136719 +59 0.355469 0.0859375 0.00390625 0.0234375 0.00390625 0.03125 0.0136719 +64 0.369141 0.0859375 0 0.015625 0.0136719 0.03125 0.0136719 +35 0.392578 0.0859375 0 0.015625 0.0136719 0.03125 0.0136719 +36 0.416016 0.0859375 0.00195312 0.0117188 0.00976562 0.0390625 0.0136719 +37 0.435547 0.0859375 0 0.015625 0.0136719 0.03125 0.0136719 +94 0.458984 0.0859375 0.00195312 0.0117188 0.00976562 0.0273438 0.0136719 +38 0.478516 0.0859375 0 0.015625 0.0136719 0.03125 0.0136719 +42 0.501953 0.0859375 0.00195312 0.015625 0.00976562 0.015625 0.0136719 +33 0.521484 0.0859375 0.00585938 0.015625 0.00195312 0.03125 0.0136719 +63 0.533203 0.0859375 0.00195312 0.015625 0.00976562 0.03125 0.0136719 +40 0.552734 0.0859375 0.00390625 0.0117188 0.0078125 0.0429688 0.0136719 +41 0.570312 0.0859375 0.00195312 0.0117188 0.0078125 0.0429688 0.0136719 +91 0.587891 0.0859375 0.00585938 0.0117188 0.0078125 0.0429688 0.0136719 +93 0.605469 0.0859375 0.00195312 0.0117188 0.0078125 0.0429688 0.0136719 +123 0.623047 0.0859375 0.00195312 0.0117188 0.00976562 0.0429688 0.0136719 +125 0.642578 0.0859375 0.00195312 0.0117188 0.00976562 0.0429688 0.0136719 +60 0.662109 0.0859375 0.00195312 0.0234375 0.00976562 0.0234375 0.0136719 +62 0.681641 0.0859375 0.00195312 0.0234375 0.00976562 0.0234375 0.0136719 +95 0.701172 0.0859375 0 0.046875 0.0136719 0.00390625 0.0136719 +45 0.724609 0.0859375 0.00195312 0.03125 0.00976562 0.00390625 0.0136719 +43 0.744141 0.0859375 0 0.0234375 0.0136719 0.0234375 0.0136719 +61 0.767578 0.0859375 0.00195312 0.0273438 0.00976562 0.0117188 0.0136719 +124 0.787109 0.0859375 0.00585938 0.0117188 0.00195312 0.0429688 0.0136719 +92 0.798828 0.0859375 0 0.0117188 0.0136719 0.0429688 0.0136719 +47 0.822266 0.0859375 0 0.0117188 0.0136719 0.0429688 0.0136719 +126 0.845703 0.0859375 0 0.03125 0.0136719 0.0078125 0.0136719 +96 0.869141 0.0859375 0.00390625 0.0117188 0.00390625 0.0078125 0.0136719 +34 0.882812 0.0859375 0.00195312 0.0117188 0.0078125 0.0117188 0.0136719 +39 0.900391 0.0859375 0.00585938 0.0117188 0.00195312 0.0117188 0.0136719 diff --git a/assets/ui/back_btn.png b/assets/ui/back_btn.png new file mode 100755 index 0000000..4176c8b Binary files /dev/null and b/assets/ui/back_btn.png differ diff --git a/game/gamecode.h b/game/gamecode.h index 89c0f84..4d592dc 100644 --- a/game/gamecode.h +++ b/game/gamecode.h @@ -119,6 +119,7 @@ struct TBallInstancingList class TGameLevel : public TGameAreaAncestor { + friend class TMyApplication; protected: float lvlWidth; float lvlHeight; diff --git a/game/main_code.cpp b/game/main_code.cpp index bd83183..19b19c2 100644 --- a/game/main_code.cpp +++ b/game/main_code.cpp @@ -111,10 +111,14 @@ void TMyApplication::InnerInit() Application->SetGameLevelScreenScale(); //GameLevel.SetLevelScale(); EffectsInit(); - /* + + // ------- UI ------- + ResourceManager->FontManager.AddFont("arial32", "arial32.png", "arial32.txt"); + ResourceManager->FontManager.AddFont("lucon12", "lucon12.png", "lucon12.txt"); + ResourceManager->FontManager.PushFont("lucon12"); ResourceManager->newGuiManager.LoadFromConfig("gui_alex.json"); SetButtonsAction(); - */ + // ------- UI ------- } void TMyApplication::InnerDeinit() @@ -202,7 +206,7 @@ void TMyApplication::ApplySignalsToGame() OnTapUpSignal.connect(boost::bind(&TGameLevel::OnTapUp, boost::ref(GameLevel), _1)); OnFlingSignal.connect(boost::bind(&TGameLevel::OnFling, boost::ref(GameLevel), _1)); OnScrollSignal.connect(boost::bind(&TGameLevel::OnScroll, boost::ref(GameLevel), _1)); - OnTapDownSignal.connect(boost::bind(&TGameLevel::OnTapDown, boost::ref(GameLevel), _1)); + //OnTapDownSignal.connect(boost::bind(&TGameLevel::OnTapDown, boost::ref(GameLevel), _1)); } @@ -211,7 +215,7 @@ void TMyApplication::DisapplySignalsToGame() OnTapUpSignal.disconnect(boost::bind(&TGameLevel::OnTapUp, boost::ref(GameLevel), _1)); OnFlingSignal.disconnect(boost::bind(&TGameLevel::OnFling, boost::ref(GameLevel), _1)); OnScrollSignal.disconnect(boost::bind(&TGameLevel::OnScroll, boost::ref(GameLevel), _1)); - OnTapDownSignal.disconnect(boost::bind(&TGameLevel::OnTapDown, boost::ref(GameLevel), _1)); + //OnTapDownSignal.disconnect(boost::bind(&TGameLevel::OnTapDown, boost::ref(GameLevel), _1)); } @@ -544,7 +548,7 @@ void TMyApplication::InnerOnMouseDown(TMouseState& mouseState) { } } */ - OnTapDownSignal(Vector2f(mouseState.X, ((Renderer->GetScreenHeight()) - mouseState.Y))); // Temporary mouse down action for WIN32 + OnTapDownSignal(Vector2f(mouseState.X, ((Renderer->GetScreenHeight()) - mouseState.Y))); // Temp mouse down action for WIN32 } void TMyApplication::InnerOnMouseMove(TMouseState& mouseState) { @@ -641,8 +645,9 @@ void TMyApplication::fireworkEffect() { void TMyApplication::SetButtonsAction () { auto backBtn = ResourceManager->newGuiManager.findWidgetByName("backButton"); if (backBtn) { - backBtn->onMouseUpSignal.connect([this, backBtn](Vector2f pos, int touchNumber) { - + backBtn->onMouseDownSignal.connect([this, backBtn](Vector2f pos, int touchNumber) { + this->GameLevel.SetPause(); + this->GameLevel.PrevLevelStateIsStandby = true; }); } } \ No newline at end of file