Pokitto turn based strategy game.

Dependencies:   PokittoLib

Revision:
10:c1af7a94f3f9
Parent:
9:682f31473b25
Child:
11:4c61319450c8
--- a/wars.cpp	Mon Dec 11 04:39:14 2017 +0000
+++ b/wars.cpp	Mon Dec 11 04:50:57 2017 +0000
@@ -419,10 +419,10 @@
 
 void DrawSelectedBaseUI(Base * base, int y) {
     disp.setColor(0);
-    disp.fillRoundRect(1,y,SW-20,88-67,3);
+    disp.fillRoundRect(1,y,SW-27,88-67,3);
     if (!base) return;
     disp.setColor(15);
-    printb(3,y-3,id_names[(base->faction*4)+selected_task]);
+    printb(3,y-6,id_names[(base->faction*4)+selected_task]);
 
     printb(16, (-y)+68, "SPAWN");
     printb(18+(6*5),(-y)+68,Faction[base->faction]);
@@ -430,7 +430,7 @@
     disp.invisiblecolor = 13;
     for (int i=0; i<4; i++) {
         int spr = (base->faction*9)+(i*2);
-        int x = 2+i*20;
+        int x = 3+i*20;
         disp.setColor(15);
         if (i==selected_task) {
             disp.fillRect(x+1,y+3,16,16);
@@ -972,11 +972,10 @@
             if (btn.pressed(BTN_A)) {
                 if (!current_hero&&current_base&&current_task==TASK_SPAWN) {
                     int8_t id = selected_task + (current_base->faction*4);
+                    selected_task = TASK_MOVE;
                     heros.push_back(Hero(cursor_x, cursor_y, id, current_team));
-
                     current_task = TASK_NONE;
                     current_hero = &heros[heros.size()-1];
-                    selected_task = TASK_MOVE;
                     current_base=NULL;
                 }
                 if (current_hero&&current_task!=TASK_NONE) {