Fixed a typo and made controller layout toggleable.
This commit is contained in:
parent
e526c037e8
commit
c3b2b6f214
|
@ -185,7 +185,7 @@ static char *health_tooltip[] = {
|
||||||
" You take a sip from your health vial", "",
|
" You take a sip from your health vial", "",
|
||||||
"",
|
"",
|
||||||
" The current amount of sips in your vials is", "",
|
" The current amount of sips in your vials is", "",
|
||||||
" dsplayed in the panel to the right.", "",
|
" displayed in the panel to the right.", "",
|
||||||
"",
|
"",
|
||||||
"COOLDOWN:", "",
|
"COOLDOWN:", "",
|
||||||
" 0 turns", "",
|
" 0 turns", "",
|
||||||
|
|
|
@ -23,9 +23,15 @@
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#include "texturecache.h"
|
#include "texturecache.h"
|
||||||
|
|
||||||
|
static bool controller_mode = false;
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
render_button_texture_for(const char *text, Position pos, Camera *cam)
|
render_button_texture_for(const char *text, Position pos, Camera *cam)
|
||||||
{
|
{
|
||||||
|
if (!controller_mode) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Texture *t = texturecache_add("Extras/Controller.png");
|
Texture *t = texturecache_add("Extras/Controller.png");
|
||||||
SDL_Rect clip;
|
SDL_Rect clip;
|
||||||
if (strcmp(text, "1") == 0) {
|
if (strcmp(text, "1") == 0) {
|
||||||
|
@ -110,3 +116,9 @@ tooltip_create(char **content, Camera *cam)
|
||||||
|
|
||||||
return sprite;
|
return sprite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
tooltip_set_controller_mode(bool ctrl_mode)
|
||||||
|
{
|
||||||
|
controller_mode = ctrl_mode;
|
||||||
|
}
|
||||||
|
|
|
@ -23,3 +23,6 @@
|
||||||
|
|
||||||
Sprite *
|
Sprite *
|
||||||
tooltip_create(char **content, Camera*);
|
tooltip_create(char **content, Camera*);
|
||||||
|
|
||||||
|
void
|
||||||
|
tooltip_set_controller_mode(bool);
|
Loading…
Reference in New Issue