🐛 Fix infopanel text color
This commit is contained in:
parent
081a077f6f
commit
68e73c0dfe
6 changed files with 22 additions and 22 deletions
|
|
@ -61,7 +61,7 @@ int pnumlines;
|
|||
bool pinfoflag;
|
||||
bool talkButtonsDown[3];
|
||||
spell_id pSpell;
|
||||
text_color infoclr;
|
||||
uint16_t infoclr;
|
||||
int sgbPlrTalkTbl;
|
||||
char tempstr[256];
|
||||
bool whisperList[MAX_PLRS];
|
||||
|
|
@ -918,14 +918,14 @@ void CheckPanelInfo()
|
|||
sprintf(tempstr, _("Hotkey: %s"), _(PanBtnHotKey[i]));
|
||||
AddPanelString(tempstr);
|
||||
}
|
||||
infoclr = COL_WHITE;
|
||||
infoclr = UIS_SILVER;
|
||||
panelflag = true;
|
||||
pinfoflag = true;
|
||||
}
|
||||
}
|
||||
if (!spselflag && MouseX >= 565 + PANEL_LEFT && MouseX < 621 + PANEL_LEFT && MouseY >= 64 + PANEL_TOP && MouseY < 120 + PANEL_TOP) {
|
||||
strcpy(infostr, _("Select current spell button"));
|
||||
infoclr = COL_WHITE;
|
||||
infoclr = UIS_SILVER;
|
||||
panelflag = true;
|
||||
pinfoflag = true;
|
||||
strcpy(tempstr, _("Hotkey: 's'"));
|
||||
|
|
@ -1095,14 +1095,14 @@ static void PrintInfo(const CelOutputBuffer &out)
|
|||
int yo = 0;
|
||||
int lo = 1;
|
||||
if (infostr[0] != '\0') {
|
||||
DrawString(out, infostr, line, UIS_SILVER | UIS_CENTER);
|
||||
DrawString(out, infostr, line, infoclr | UIS_CENTER);
|
||||
yo = 1;
|
||||
lo = 0;
|
||||
}
|
||||
|
||||
for (int i = 0; i < pnumlines; i++) {
|
||||
line.y = PANEL_Y + LineOffsets[pnumlines - lo][i + yo];
|
||||
DrawString(out, panelstr[i], line, UIS_SILVER | UIS_CENTER);
|
||||
DrawString(out, panelstr[i], line, infoclr | UIS_CENTER);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1111,11 +1111,11 @@ void DrawInfoBox(const CelOutputBuffer &out)
|
|||
DrawPanelBox(out, 177, 62, 288, 60, PANEL_X + 177, PANEL_Y + 46);
|
||||
if (!panelflag && !trigflag && pcursinvitem == -1 && !spselflag) {
|
||||
infostr[0] = '\0';
|
||||
infoclr = COL_WHITE;
|
||||
infoclr = UIS_SILVER;
|
||||
ClearPanel();
|
||||
}
|
||||
if (spselflag || trigflag) {
|
||||
infoclr = COL_WHITE;
|
||||
infoclr = UIS_SILVER;
|
||||
} else if (pcurs >= CURSOR_FIRSTITEM) {
|
||||
if (plr[myplr].HoldItem._itype == ITYPE_GOLD) {
|
||||
int nGold = plr[myplr].HoldItem._ivalue;
|
||||
|
|
@ -1130,9 +1130,9 @@ void DrawInfoBox(const CelOutputBuffer &out)
|
|||
else
|
||||
strcpy(infostr, plr[myplr].HoldItem._iName);
|
||||
if (plr[myplr].HoldItem._iMagical == ITEM_QUALITY_MAGIC)
|
||||
infoclr = COL_BLUE;
|
||||
infoclr = UIS_BLUE;
|
||||
if (plr[myplr].HoldItem._iMagical == ITEM_QUALITY_UNIQUE)
|
||||
infoclr = COL_GOLD;
|
||||
infoclr = UIS_GOLD;
|
||||
}
|
||||
} else {
|
||||
if (pcursitem != -1)
|
||||
|
|
@ -1141,11 +1141,11 @@ void DrawInfoBox(const CelOutputBuffer &out)
|
|||
GetObjectStr(pcursobj);
|
||||
if (pcursmonst != -1) {
|
||||
if (leveltype != DTYPE_TOWN) {
|
||||
infoclr = COL_WHITE;
|
||||
infoclr = UIS_SILVER;
|
||||
strcpy(infostr, _(monster[pcursmonst].mName));
|
||||
ClearPanel();
|
||||
if (monster[pcursmonst]._uniqtype != 0) {
|
||||
infoclr = COL_GOLD;
|
||||
infoclr = UIS_GOLD;
|
||||
PrintUniqueHistory();
|
||||
} else {
|
||||
PrintMonstHistory(monster[pcursmonst].MType->mtype);
|
||||
|
|
@ -1157,7 +1157,7 @@ void DrawInfoBox(const CelOutputBuffer &out)
|
|||
}
|
||||
}
|
||||
if (pcursplr != -1) {
|
||||
infoclr = COL_GOLD;
|
||||
infoclr = UIS_GOLD;
|
||||
strcpy(infostr, plr[pcursplr]._pName);
|
||||
ClearPanel();
|
||||
sprintf(tempstr, _("%s, Level: %i"), _(ClassStrTbl[static_cast<std::size_t>(plr[pcursplr]._pClass)]), plr[pcursplr]._pLevel);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ extern bool chrbtnactive;
|
|||
extern int pnumlines;
|
||||
extern bool pinfoflag;
|
||||
extern spell_id pSpell;
|
||||
extern text_color infoclr;
|
||||
extern uint16_t infoclr;
|
||||
extern char tempstr[256];
|
||||
extern int sbooktab;
|
||||
extern spell_type pSplType;
|
||||
|
|
|
|||
|
|
@ -2014,7 +2014,7 @@ char CheckInvHLight()
|
|||
return -1;
|
||||
|
||||
int8_t rv = -1;
|
||||
infoclr = COL_WHITE;
|
||||
infoclr = UIS_SILVER;
|
||||
pi = nullptr;
|
||||
p = &plr[myplr];
|
||||
ClearPanel();
|
||||
|
|
@ -2069,9 +2069,9 @@ char CheckInvHLight()
|
|||
sprintf(infostr, ngettext("%i gold piece", "%i gold pieces", nGold), nGold);
|
||||
} else {
|
||||
if (pi->_iMagical == ITEM_QUALITY_MAGIC) {
|
||||
infoclr = COL_BLUE;
|
||||
infoclr = UIS_BLUE;
|
||||
} else if (pi->_iMagical == ITEM_QUALITY_UNIQUE) {
|
||||
infoclr = COL_GOLD;
|
||||
infoclr = UIS_GOLD;
|
||||
}
|
||||
if (pi->_iIdentified) {
|
||||
strcpy(infostr, pi->_iIName);
|
||||
|
|
|
|||
|
|
@ -3056,9 +3056,9 @@ void GetItemStr(int i)
|
|||
strcpy(infostr, items[i]._iName);
|
||||
|
||||
if (items[i]._iMagical == ITEM_QUALITY_MAGIC)
|
||||
infoclr = COL_BLUE;
|
||||
infoclr = UIS_BLUE;
|
||||
if (items[i]._iMagical == ITEM_QUALITY_UNIQUE)
|
||||
infoclr = COL_GOLD;
|
||||
infoclr = UIS_GOLD;
|
||||
} else {
|
||||
nGold = items[i]._ivalue;
|
||||
sprintf(infostr, ngettext("%i gold piece", "%i gold pieces", nGold), nGold);
|
||||
|
|
|
|||
|
|
@ -5576,13 +5576,13 @@ void GetObjectStr(int i)
|
|||
if (object[i]._oTrapFlag) {
|
||||
sprintf(tempstr, _("Trapped %s"), infostr);
|
||||
strcpy(infostr, tempstr);
|
||||
infoclr = COL_RED;
|
||||
infoclr = UIS_RED;
|
||||
}
|
||||
}
|
||||
if (objectIsDisabled(i)) {
|
||||
sprintf(tempstr, _("%s (disabled)"), infostr);
|
||||
strcpy(infostr, tempstr);
|
||||
infoclr = COL_RED;
|
||||
infoclr = UIS_RED;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ bool CheckXPBarInfo()
|
|||
|
||||
if (charLevel == MAXCHARLEVEL - 1) {
|
||||
// Show a maximum level indicator for max level players.
|
||||
infoclr = COL_GOLD;
|
||||
infoclr = UIS_GOLD;
|
||||
|
||||
strcpy(tempstr, _("Experience: "));
|
||||
PrintWithSeparator(tempstr + SDL_arraysize("Experience: ") - 1, ExpLvlsTbl[charLevel - 1]);
|
||||
|
|
@ -137,7 +137,7 @@ bool CheckXPBarInfo()
|
|||
return true;
|
||||
}
|
||||
|
||||
infoclr = COL_WHITE;
|
||||
infoclr = UIS_SILVER;
|
||||
|
||||
strcpy(tempstr, _("Experience: "));
|
||||
PrintWithSeparator(tempstr + SDL_arraysize("Experience: ") - 1, player._pExperience);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue