From 5071a1754f3db0adcf477ecf8e5b2a818d1935bd Mon Sep 17 00:00:00 2001 From: lordjaxom Date: Wed, 14 Jul 2004 16:49:10 +0000 Subject: - fixed display of scrollbar if there is no text present - fixed animation delay if update takes longer than the delay - using backgrounds also in 8-bit fullscreen mode to improve performance - implemented screen layer to improve performance - corrected offsets and tab widths in main menu - implemented parameters "current", "mark" and "selected" to choose mark colors in replay display (defaults to the old values) - implemented color value "None" to be able to unset a color --- data.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'data.c') diff --git a/data.c b/data.c index e4b35d7..c7053b1 100644 --- a/data.c +++ b/data.c @@ -1,5 +1,5 @@ /* - * $Id: data.c,v 1.20 2004/06/22 16:48:03 lordjaxom Exp $ + * $Id: data.c,v 1.21 2004/07/13 13:52:51 lordjaxom Exp $ */ #include "data.h" @@ -12,6 +12,9 @@ cText2SkinItem::cText2SkinItem(void) { mBpp = 4; mArc = 0; mAlpha = 0; + mSelected= "#FFFC1414"; + mMark = "#FF000000"; + mCurrent = "#FFFC1414"; mFont = cFont::GetFont(fontOsd); mAlign = taDefault; mBase = baseRelative; @@ -52,6 +55,9 @@ bool cText2SkinItem::ParseItem(const char *Text) { ParseVar(Text, "alpha", &mAlpha); ParseVar(Text, "fg", mFg); ParseVar(Text, "bg", mBg); + ParseVar(Text, "selected", mSelected); + ParseVar(Text, "mark", mMark); + ParseVar(Text, "current", mCurrent); ParseVar(Text, "font", &mFont); ParseVar(Text, "path", mPath); ParseVar(Text, "altpath", mAltPath); @@ -72,6 +78,31 @@ const SIZE cText2SkinItem::Size(void) const { return SIZE(p2.x - p1.x + 1, p2.y - p1.y + 1); } +const tColor *cText2SkinItem::Fg(void) const { + static tColor Fg; + return cText2SkinRender::ItemColor(mFg, Fg) ? &Fg : NULL; +} + +const tColor *cText2SkinItem::Bg(void) const { + static tColor Bg; + return cText2SkinRender::ItemColor(mBg, Bg) ? &Bg : NULL; +} + +const tColor *cText2SkinItem::Selected(void) const { + static tColor Selected; + return cText2SkinRender::ItemColor(mSelected, Selected) ? &Selected : NULL; +} + +const tColor *cText2SkinItem::Mark(void) const { + static tColor Mark; + return cText2SkinRender::ItemColor(mMark, Mark) ? &Mark : NULL; +} + +const tColor *cText2SkinItem::Current(void) const { + static tColor Current; + return cText2SkinRender::ItemColor(mCurrent, Current) ? &Current : NULL; +} + // --- cText2SkinData --------------------------------------------------------- cText2SkinData::cText2SkinData(const char *Skin): cText2SkinFile(Skin) { -- cgit v1.2.3