diff --git a/data/sprites/gui_rect_white.sprite b/data/sprites/gui_rect_white.sprite new file mode 100644 index 0000000..e551532 --- /dev/null +++ b/data/sprites/gui_rect_white.sprite @@ -0,0 +1,75 @@ +{ + +"ui_rect_white_nw" : { + "texture" : "gui_back_white", + "topx" : 0, + "topy" : 0, + "height" : 32, + "width" : 32 +}, + +"ui_rect_white_n" : { + "texture" : "gui_back_white", + "topx" : 32, + "topy" : 0, + "height" : 32, + "width" : 32 +}, + +"ui_rect_white_ne" : { + "texture" : "gui_back_white", + "topx" : 160, + "topy" : 0, + "height" : 32, + "width" : 32 +}, + +"ui_rect_white_e" : { + "texture" : "gui_back_white", + "topx" : 160, + "topy" : 32, + "height" : 32, + "width" : 32 +}, + +"ui_rect_white_se" : { + "texture" : "gui_back_white", + "topx" : 160, + "topy" : 160, + "height" : 32, + "width" : 32 +}, + +"ui_rect_white_s" : { + "texture" : "gui_back_white", + "topx" : 32, + "topy" : 160, + "height" : 32, + "width" : 32 +}, + +"ui_rect_white_sw" : { + "texture" : "gui_back_white", + "topx" : 0, + "topy" : 160, + "height" : 32, + "width" : 32 +}, + +"ui_rect_white_w" : { + "texture" : "gui_back_white", + "topx" : 0, + "topy" : 32, + "height" : 32, + "width" : 32 +}, + +"ui_rect_white_fill" : { + "texture" : "gui_back_white", + "topx" : 32, + "topy" : 32, + "height" : 32, + "width" : 32 +} + +} diff --git a/data/textures/AUTH b/data/textures/AUTH index 898026d..20fe3a8 100644 --- a/data/textures/AUTH +++ b/data/textures/AUTH @@ -3,6 +3,7 @@ effects/ shot_fireball.png MSavioti (https://opengameart.org/content/firebal-32x32) (CC0 license) textures/ food.png "[LPC] Foods" by bluecarrot16, Daniel Eddeland (daneeklu), Joshua Taylor, Richard Kettering (Jetrel), thekingphoenix, RedVoxel, and Molly "Cougarmint" Willits. See food.png.txt. (CC-BY-SA 3.0/GPL3) +gui_back_white.png Derived from UI pack by Kenney Vleugels (www.kenney.nl) (CC0 license) gui_back_yellow.png Derived from UI pack by Kenney Vleugels (www.kenney.nl) (CC0 license) menu_marked.png Derived from UI pack by Kenney Vleugels (www.kenney.nl) (CC0 license) menu_unmarked.png Derived from UI pack by Kenney Vleugels (www.kenney.nl) (CC0 license) diff --git a/data/textures/gui_back_white.png b/data/textures/gui_back_white.png new file mode 100644 index 0000000..0368709 Binary files /dev/null and b/data/textures/gui_back_white.png differ diff --git a/src/saland/Game.cpp b/src/saland/Game.cpp index 9ea13e7..c0f11c7 100644 --- a/src/saland/Game.cpp +++ b/src/saland/Game.cpp @@ -174,6 +174,7 @@ struct Game::GameImpl { sago::SagoTextField bottomField; sago::SagoTextField middleField; std::array number_labels; //Label: 0,1...10 + size_t slot_selected = 0; std::shared_ptr console; bool consoleActive = false; }; @@ -353,7 +354,12 @@ void Game::Draw(SDL_Renderer* target) { DrawRectYellow(target, screen_width-70, screen_height-70, 52, 52); DrawTile(target, globalData.spriteHolder.get(), data->gameRegion.world.tm, data->drawTile, screen_width-60, screen_height-60); for (size_t i = 0; i < 10; ++i) { - DrawRectYellow(target, 10+i*56, 10, 52, 52); + if (data->slot_selected == i) { + DrawRectWhite(target, 10+i*56, 10, 52, 52); + } + else { + DrawRectYellow(target, 10+i*56, 10, 52, 52); + } int key_number = (i+1)%10; data->number_labels.at(key_number).Draw(target, 10+i*56, 10); }