Fixed a typo and made controller layout toggleable.

This commit is contained in:
Linus Probert 2018-10-10 22:38:54 +02:00
parent e526c037e8
commit c3b2b6f214
3 changed files with 16 additions and 1 deletions

View File

@ -185,7 +185,7 @@ static char *health_tooltip[] = {
" You take a sip from your health vial", "",
"",
" The current amount of sips in your vials is", "",
" dsplayed in the panel to the right.", "",
" displayed in the panel to the right.", "",
"",
"COOLDOWN:", "",
" 0 turns", "",

View File

@ -23,9 +23,15 @@
#include "gui.h"
#include "texturecache.h"
static bool controller_mode = false;
static bool
render_button_texture_for(const char *text, Position pos, Camera *cam)
{
if (!controller_mode) {
return false;
}
Texture *t = texturecache_add("Extras/Controller.png");
SDL_Rect clip;
if (strcmp(text, "1") == 0) {
@ -110,3 +116,9 @@ tooltip_create(char **content, Camera *cam)
return sprite;
}
void
tooltip_set_controller_mode(bool ctrl_mode)
{
controller_mode = ctrl_mode;
}

View File

@ -23,3 +23,6 @@
Sprite *
tooltip_create(char **content, Camera*);
void
tooltip_set_controller_mode(bool);