Enable immediate tooltips on mouse-over-event for unlabeled icons in lobby and scenario selection (#1132).

shapetextures
Sven Eberhardt 2015-12-06 21:03:54 -05:00
parent 51651b5b87
commit 019cc0d583
8 changed files with 66 additions and 43 deletions

View File

@ -181,7 +181,7 @@ IDS_DESC_PACKETLOGGING=Speichert den gesamten Netzwerkverkehr in der Logdatei.
IDS_DESC_CHANGESTHEWAYCONTROLDATAI=Legt fest, wie Steuerungsdaten in Netzwerkspielen zwischen Client-Rechnern ausgetauscht werden.
IDS_DESC_CHECKONLINEFORNEWVERSIONS=Sucht online nach Updates für diese Version.
IDS_DESC_CLIENTS=Clients:
IDS_DESC_COMMENTDESCRIPTIONFORTHIS=Kommentar: Beschreibungstext für diese Runde, der für andere Spieler angezeigt wird.
IDS_DESC_COMMENTDESCRIPTIONFORTHIS=&Kommentar: Beschreibungstext für diese Runde, der für andere Spieler angezeigt wird.
IDS_DESC_CONNECTSTOANIRCCHATSERVER=Verbindet mit einem IRC-Chat-Server.
IDS_DESC_CONTINUETHEROUNDWITHNOFUR=Die Runde fortsetzen (ohne weitere Auswertung).
IDS_DESC_CONTROLWAITTIME=Lag
@ -256,15 +256,15 @@ IDS_DLGTIP_PLAYERPROPERTIES=Ändert die Spielereigenschaften.
IDS_DLGTIP_PLAYERSELECTION=Legt die Spieler fest, die an der nächsten Runde teilnehmen sollen.
IDS_DLGTIP_PROGRESS=Fortschrittsanzeige
IDS_DLGTIP_READY=Signalisiert, dass das Spiel losgehen kann.
IDS_DLGTIP_RECORD=Runde aufnehmen: die Runde wird aufgezeichnet und kann später wiedergegeben werden.
IDS_DLGTIP_RECORD=&Runde aufnehmen: die Runde wird aufgezeichnet und kann später wiedergegeben werden.
IDS_DLGTIP_SCENSELNEXT=Öffnet den ausgewählten Ordner oder startet das ausgewählte Szenario.
IDS_DLGTIP_SEARCHINTERNETGAME=Internetspiele: neben lokalen Netzwerkspielen wird auch nach Internetspielen gesucht.
IDS_DLGTIP_SELALL=Markiert den gesamten Text
IDS_DLGTIP_SELECTEDPLAYERS=Diese Spieler nehmen an der nächsten Runde teil.
IDS_DLGTIP_SELECTSCENARIO=Hier gewünschten Rundenordner oder gewünschtes Szenario auswählen.
IDS_DLGTIP_STARTGAME=Startet ein lokales Spiel ohne Netzwerkunterstützung.
IDS_DLGTIP_STARTINTERNETGAME=Internetspiel: andere Spieler können diese Runde im Internet sehen.
IDS_DLGTIP_STARTLEAGUEGAME=Ligaspiel: die Runde soll in der Liga ausgewertet werden.
IDS_DLGTIP_STARTINTERNETGAME=&Internetspiel: andere Spieler können diese Runde im Internet sehen.
IDS_DLGTIP_STARTLEAGUEGAME=&Ligaspiel: die Runde soll in der Liga ausgewertet werden.
IDS_DLGTIP_UPDATE=Update verfügbar: hier klicken, um die neue Version des Spiels herunterzuladen und zu installieren.
IDS_DLG_ABORT=Abbruch
IDS_DLG_ABOUT=&Credits
@ -303,6 +303,7 @@ IDS_DLG_PASTE=Einfügen
IDS_DLG_PLAYER2=Spielereigenschaften
IDS_DLG_PLAYERCOLORSELECTION=Farbwahl
IDS_DLG_PLAYERS=S&pieler
IDS_DLG_PLAYERSBYTEAM=Spieler nach &Team
IDS_DLG_PLAYERSELECTION=S&pielerauswahl
IDS_DLG_PROGRAM=Programm
IDS_DLG_PROPERTIES=Eigenschaften

View File

@ -181,7 +181,7 @@ IDS_DESC_PACKETLOGGING=Dumps all network traffic into the log file.
IDS_DESC_CHANGESTHEWAYCONTROLDATAI=Changes the way control data is exchanged between network clients.
IDS_DESC_CHECKONLINEFORNEWVERSIONS=Check online for new versions.
IDS_DESC_CLIENTS=Clients:
IDS_DESC_COMMENTDESCRIPTIONFORTHIS=Comment: description for this round which can be seen by other players.
IDS_DESC_COMMENTDESCRIPTIONFORTHIS=Co&mment: description for this round which can be seen by other players.
IDS_DESC_CONNECTSTOANIRCCHATSERVER=Connects to an IRC chat server.
IDS_DESC_CONTINUETHEROUNDWITHNOFUR=Continue playing this round (with no further evaluation).
IDS_DESC_CONTROLWAITTIME=Lag
@ -256,15 +256,15 @@ IDS_DLGTIP_PLAYERPROPERTIES=Change player color and preferred controls.
IDS_DLGTIP_PLAYERSELECTION=Select the players who are to take part in the next round.
IDS_DLGTIP_PROGRESS=Progress bar
IDS_DLGTIP_READY=Set yourself as ready to play
IDS_DLGTIP_RECORD=Record game: the round is recorded for later playback.
IDS_DLGTIP_RECORD=&Record game: the round is recorded for later playback.
IDS_DLGTIP_SCENSELNEXT=Open the selected folder or start the selected scenario.
IDS_DLGTIP_SEARCHINTERNETGAME=Internet games: besides local network games also search for internet games.
IDS_DLGTIP_SELALL=Selects the complete text
IDS_DLGTIP_SELECTEDPLAYERS=These players will take part in the next round.
IDS_DLGTIP_SELECTSCENARIO=Select the desired folder or scenario here.
IDS_DLGTIP_STARTGAME=Start a local game without network support.
IDS_DLGTIP_STARTINTERNETGAME=Internet game: other players can see this round on the internet.
IDS_DLGTIP_STARTLEAGUEGAME=League game: this round will be evaluated in the league.
IDS_DLGTIP_STARTINTERNETGAME=&Internet game: other players can see this round on the internet.
IDS_DLGTIP_STARTLEAGUEGAME=&League game: this round will be evaluated in the league.
IDS_DLGTIP_UPDATE=Update available: click here to download and install the new version of the game.
IDS_DLG_ABORT=Abort
IDS_DLG_ABOUT=&Credits
@ -303,6 +303,7 @@ IDS_DLG_PASTE=Paste
IDS_DLG_PLAYER2=Player Properties
IDS_DLG_PLAYERCOLORSELECTION=Choose a color
IDS_DLG_PLAYERS=&Players
IDS_DLG_PLAYERSBYTEAM=Players by &Team
IDS_DLG_PLAYERSELECTION=&Player Selection
IDS_DLG_PROGRAM=Program
IDS_DLG_PROPERTIES=Properties
@ -734,7 +735,7 @@ IDS_NET_NOSAMESYSTEM=System file %s differs from that used by the host!
IDS_NET_NOVALIDCORE=Network: Resource core for file %s is invalid!
IDS_NET_OFFICIALSERVER=Official Server
IDS_NET_OUTPUT=Network Output
IDS_NET_PASSWORD_DESC=Password protection: other players can only join with a password.
IDS_NET_PASSWORD_DESC=&Password protection: other players can only join with a password.
IDS_NET_PORT_DISCOVERY=Discovery port
IDS_NET_PORT_DISCOVERY_DESC=Configure port used for automatic game discovery in LAN.
IDS_NET_PORT_REFERENCE=Reference port

View File

@ -233,13 +233,15 @@ namespace C4GameLobby
bool fHasChat = C4ChatDlg::IsChatActive();
int32_t iBtnNum = 4+fHasTeams+fHasChat;
if (fHasTeams)
btnTeams = new C4GUI::CallbackButton<MainDlg, C4GUI::IconButton>(C4GUI::Ico_Team, pRightTabLbl->GetToprightCornerRect(16,16,4,4,--iBtnNum), pPlayerSheet->GetHotkey(), &MainDlg::OnTabTeams);
btnPlayers = new C4GUI::CallbackButton<MainDlg, C4GUI::IconButton>(C4GUI::Ico_Player, pRightTabLbl->GetToprightCornerRect(16,16,4,4,--iBtnNum), pPlayerSheet->GetHotkey(), &MainDlg::OnTabPlayers);
btnResources = new C4GUI::CallbackButton<MainDlg, C4GUI::IconButton>(C4GUI::Ico_Resource, pRightTabLbl->GetToprightCornerRect(16,16,4,4,--iBtnNum), pResSheet->GetHotkey(), &MainDlg::OnTabRes);
btnOptions = new C4GUI::CallbackButton<MainDlg, C4GUI::IconButton>(C4GUI::Ico_Options, pRightTabLbl->GetToprightCornerRect(16,16,4,4,--iBtnNum), pOptionsSheet->GetHotkey(), &MainDlg::OnTabOptions);
btnScenario = new C4GUI::CallbackButton<MainDlg, C4GUI::IconButton>(C4GUI::Ico_Gfx, pRightTabLbl->GetToprightCornerRect(16,16,4,4,--iBtnNum), pOptionsSheet->GetHotkey(), &MainDlg::OnTabScenario);
{
btnTeams = new C4GUI::CallbackButton<MainDlg, C4GUI::IconButton>(C4GUI::Ico_Team, pRightTabLbl->GetToprightCornerRect(16, 16, 4, 4, --iBtnNum), LoadResStr("IDS_DLG_PLAYERSBYTEAM"), &MainDlg::OnTabTeams);
}
btnPlayers = new C4GUI::CallbackButton<MainDlg, C4GUI::IconButton>(C4GUI::Ico_Player, pRightTabLbl->GetToprightCornerRect(16,16,4,4,--iBtnNum), LoadResStr("IDS_DLG_PLAYERS"), &MainDlg::OnTabPlayers);
btnResources = new C4GUI::CallbackButton<MainDlg, C4GUI::IconButton>(C4GUI::Ico_Resource, pRightTabLbl->GetToprightCornerRect(16,16,4,4,--iBtnNum), LoadResStr("IDS_DLG_RESOURCES"), &MainDlg::OnTabRes);
btnOptions = new C4GUI::CallbackButton<MainDlg, C4GUI::IconButton>(C4GUI::Ico_Options, pRightTabLbl->GetToprightCornerRect(16,16,4,4,--iBtnNum), LoadResStr("IDS_DLG_OPTIONS"), &MainDlg::OnTabOptions);
btnScenario = new C4GUI::CallbackButton<MainDlg, C4GUI::IconButton>(C4GUI::Ico_Gfx, pRightTabLbl->GetToprightCornerRect(16,16,4,4,--iBtnNum), LoadResStr("IDS_DLG_SCENARIO"), &MainDlg::OnTabScenario);
if (fHasChat)
btnChat = new C4GUI::CallbackButton<MainDlg, C4GUI::IconButton>(C4GUI::Ico_Ex_Chat, pRightTabLbl->GetToprightCornerRect(16,16,4,4,--iBtnNum), 0 /* 2do*/, &MainDlg::OnBtnChat);
btnChat = new C4GUI::CallbackButton<MainDlg, C4GUI::IconButton>(C4GUI::Ico_Ex_Chat, pRightTabLbl->GetToprightCornerRect(16,16,4,4,--iBtnNum), LoadResStr("IDS_CTL_CHAT"), &MainDlg::OnBtnChat);
// update labels and tooltips for player list
UpdateRightTab();

View File

@ -35,9 +35,9 @@ namespace C4GUI
// --------------------------------------------------
// Generic helpers
bool ExpandHotkeyMarkup(StdStrBuf &sText, uint32_t &rcHotkey)
bool ExpandHotkeyMarkup(StdStrBuf &sText, uint32_t &rcHotkey, bool for_tooltip)
{
static const char HotkeyMarkup[] = "<c ffffff7f>%s</c>";
const char *HotkeyMarkup = (for_tooltip ? "<c ff800000>%s</c>" : "<c ffffff7f>%s</c>");
StdStrBuf output;
@ -150,7 +150,7 @@ namespace C4GUI
// --------------------------------------------------
// Element
Element::Element() : pParent(NULL), pDragTarget(NULL), fDragging(false), pContextHandler(NULL), fVisible(true)
Element::Element() : pParent(NULL), pDragTarget(NULL), fDragging(false), pContextHandler(NULL), fVisible(true), is_immediate_tooltip(false)
{
// pParent=NULL invalidates pPrev/pNext
// fDragging=false invalidates iDragX/Y
@ -406,10 +406,12 @@ namespace C4GUI
return rtBounds;
}
void Element::SetToolTip(const char *szNewTooltip)
void Element::SetToolTip(const char *szNewTooltip, bool is_immediate)
{
// store tooltip
if (szNewTooltip) ToolTip.Copy(szNewTooltip); else ToolTip.Clear();
// store immediate flag
is_immediate_tooltip = is_immediate;
}
bool Element::DoContext()
@ -482,7 +484,7 @@ namespace C4GUI
}
}
void CMouse::Draw(C4TargetFacet &cgo, bool fDrawToolTip)
void CMouse::Draw(C4TargetFacet &cgo, TooltipShowState draw_tool_tips)
{
// only if owned
if (!fActive) return;
@ -498,13 +500,16 @@ namespace C4GUI
int32_t iOffsetY = -GfxR->fctMouseCursor.Hgt/2;
GfxR->fctMouseCursor.Draw(cgo.Surface,x+iOffsetX,y+iOffsetY,0);
// ToolTip
if (fDrawToolTip && pMouseOverElement)
if (pMouseOverElement && draw_tool_tips != TTST_None)
{
const char *szTip = pMouseOverElement->GetToolTip();
if (szTip && *szTip)
if (draw_tool_tips == TTST_All || pMouseOverElement->IsImmediateToolTip())
{
C4TargetFacet cgoTip; cgoTip.Set(cgo.Surface, cgo.X, cgo.Y, cgo.Wdt, cgo.Hgt);
Screen::DrawToolTip(szTip, cgoTip, x, y);
const char *szTip = pMouseOverElement->GetToolTip();
if (szTip && *szTip)
{
C4TargetFacet cgoTip; cgoTip.Set(cgo.Surface, cgo.X, cgo.Y, cgo.Wdt, cgo.Hgt);
Screen::DrawToolTip(szTip, cgoTip, x, y);
}
}
}
@ -741,7 +746,8 @@ namespace C4GUI
void Screen::RenderMouse(C4TargetFacet &cgo)
{
// draw mouse cursor
Mouse.Draw(cgo, Mouse.IsMouseStill() && Mouse.IsActiveInput());
// All tool tips hidden during keyboard input. Immediate tooltips hidden if mouse was moving recently.
Mouse.Draw(cgo, Mouse.IsActiveInput() ? Mouse.IsMouseStill() ? CMouse::TTST_All : CMouse::TTST_Immediate : CMouse::TTST_None);
}
void Screen::Draw(C4TargetFacet &cgo, bool fDoBG)

View File

@ -211,8 +211,8 @@ namespace C4GUI
class MenuHandler; class ContextHandler;
// expand text like "Te&xt" to "Te<c ffff00>x</c>t"
bool ExpandHotkeyMarkup(StdStrBuf &sText, uint32_t &rcHotkey);
// expand text like "Te&xt" to "Te<c ffff00>x</c>t". Color yellow for normal hotkey and red for tooltip.
bool ExpandHotkeyMarkup(StdStrBuf &sText, uint32_t &rcHotkey, bool for_tooltip = false);
// make color readable on black: max alpha to 0x1f, max color hues
DWORD MakeColorReadableOnBlack(DWORD &rdwClr);
@ -369,6 +369,7 @@ namespace C4GUI
{
private:
StdStrBuf ToolTip; // MouseOver - status text
bool is_immediate_tooltip;
protected:
Container *pParent; // owning container
@ -433,9 +434,10 @@ namespace C4GUI
void ScreenPos2ClientPos(int32_t &riX, int32_t &riY); // transform screen coordinates to element coordinates
void ClientPos2ScreenPos(int32_t &riX, int32_t &riY); // transform element coordinates to screen coordinates
void SetToolTip(const char *szNewTooltip); // update used tooltip
void SetToolTip(const char *szNewTooltip, bool is_immediate = false); // update used tooltip
const char *GetToolTip(); // return tooltip const char* (own or fallback to parent)
const char *GetOwnToolTip() { return ToolTip.getData(); } // return tooltip const char*, without fallback to parent
bool IsImmediateToolTip() const { return is_immediate_tooltip; }
int32_t GetWidth() { return rcBounds.Wdt; }
int32_t GetHeight() { return rcBounds.Hgt; }
@ -1118,7 +1120,7 @@ namespace C4GUI
virtual void DrawElement(C4TargetFacet &cgo); // draw icon and highlight if necessary
public:
IconButton(Icons eUseIcon, const C4Rect &rtBounds, char cHotkey); // ctor
IconButton(Icons eUseIcon, const C4Rect &rtBounds, char cHotkey='\0', const char *tooltip_text=NULL); // ctor
void SetIcon(Icons eUseIcon);
void SetFacet(const C4Facet &rCpy, uint32_t dwClr=0u) { fctIcon = rCpy; }
void SetColor(uint32_t dwClr) { fHasClr=true; this->dwClr=dwClr; }
@ -1191,6 +1193,8 @@ namespace C4GUI
: Base(szBtnText, rtBounds), pCB(pCB), pCallbackFn(pFn) { }
CallbackButton(Icons eUseIcon, const C4Rect &rtBounds, char cHotkey, typename DlgCallback<CallbackDlg>::Func pFn, CallbackDlg *pCB=NULL) // ctor
: Base(eUseIcon, rtBounds, cHotkey), pCB(pCB), pCallbackFn(pFn) { }
CallbackButton(Icons eUseIcon, const C4Rect &rtBounds, const char *tooltip_text, typename DlgCallback<CallbackDlg>::Func pFn, CallbackDlg *pCB = NULL) // ctor
: Base(eUseIcon, rtBounds, '\0', tooltip_text), pCB(pCB), pCallbackFn(pFn) { }
CallbackButton(int32_t iID, const C4Rect &rtBounds, char cHotkey, typename DlgCallback<CallbackDlg>::Func pFn, CallbackDlg *pCB=NULL) // ctor
: Base(iID, rtBounds, cHotkey), pCB(pCB), pCallbackFn(pFn) { }
};
@ -2513,6 +2517,13 @@ namespace C4GUI
// reset by keyboard actions to avoid tooltips where the user isn't even doing anything
bool fActiveInput;
enum TooltipShowState
{
TTST_None = 0, // show no tooltips
TTST_Immediate = 1, // show only tooltips of elements that require immediate show (i.e. otherwise unlabeled buttons)
TTST_All = 2, // show all tooltips (mouse hovered on same element for some time)
};
public:
Element *pMouseOverElement, *pPrevMouseOverElement; // elements at mouse position (after and before processing of mouse event)
Element *pDragElement; // element at pos where left mouse button was clicked last
@ -2521,7 +2532,7 @@ namespace C4GUI
CMouse(int32_t iX, int32_t iY); // ctor
~CMouse(); // dtor
void Draw(C4TargetFacet &cgo, bool fDrawToolTip); // draw cursor
void Draw(C4TargetFacet &cgo, TooltipShowState draw_tool_tips); // draw cursor
void Input(int32_t iButton, int32_t iX, int32_t iY, DWORD dwKeyParam); // process mouse input
bool IsLDown() { return LDown; }

View File

@ -235,12 +235,19 @@ namespace C4GUI
}
}
IconButton::IconButton(Icons eUseIcon, const C4Rect &rtBounds, char caHotkey)
IconButton::IconButton(Icons eUseIcon, const C4Rect &rtBounds, char caHotkey, const char *tooltip_text)
: Button("", rtBounds), dwClr(0u), fHasClr(false), fHighlight(false)
{
// ctor
cHotkey = caHotkey;
SetIcon(eUseIcon);
// set tooltip and expand hotkey
if (tooltip_text)
{
StdStrBuf tooltip_text_buf(tooltip_text);
if (!cHotkey) ExpandHotkeyMarkup(tooltip_text_buf, cHotkey, true);
SetToolTip(tooltip_text_buf.getData(), true);
}
}
void IconButton::SetIcon(Icons eUseIcon)

View File

@ -357,7 +357,7 @@ namespace C4GUI
pTitle->SetRightIndent(20); // for close button
if (!pCloseBtn)
{
AddElement(pCloseBtn = new CallbackButton<Dialog, IconButton>(Ico_Close, pTitle->GetToprightCornerRect(16,16,4,4,0), 0, &Dialog::OnUserClose));
AddElement(pCloseBtn = new CallbackButton<Dialog, IconButton>(Ico_Close, pTitle->GetToprightCornerRect(16,16,4,4,0), '\0', &Dialog::OnUserClose));
pCloseBtn->SetToolTip(LoadResStr("IDS_MNU_CLOSE"));
}
else

View File

@ -612,8 +612,7 @@ C4GameOptionButtons::C4GameOptionButtons(const C4Rect &rcBounds, bool fNetwork,
fIsInternet = true;
fIsDisabled = true;
}
btnInternet = new C4GUI::CallbackButton<C4GameOptionButtons, C4GUI::IconButton>(fIsInternet ? C4GUI::Ico_Ex_InternetOn : C4GUI::Ico_Ex_InternetOff, caButtons.GetFromLeft(iIconSize, iIconSize), 'I' /* 2do */, &C4GameOptionButtons::OnBtnInternet, this);
btnInternet->SetToolTip(LoadResStr("IDS_DLGTIP_STARTINTERNETGAME"));
btnInternet = new C4GUI::CallbackButton<C4GameOptionButtons, C4GUI::IconButton>(fIsInternet ? C4GUI::Ico_Ex_InternetOn : C4GUI::Ico_Ex_InternetOff, caButtons.GetFromLeft(iIconSize, iIconSize), LoadResStr("IDS_DLGTIP_STARTINTERNETGAME"), &C4GameOptionButtons::OnBtnInternet, this);
btnInternet->SetEnabled(!fIsDisabled);
AddElement(btnInternet);
}
@ -625,25 +624,21 @@ C4GameOptionButtons::C4GameOptionButtons(const C4Rect &rcBounds, bool fNetwork,
C4GUI::Icons eLeagueIcon;
fIsLeague = fLobby ? Game.Parameters.isLeague() : !!Config.Network.LeagueServerSignUp;
eLeagueIcon = fIsLeague ? C4GUI::Ico_Ex_LeagueOn : C4GUI::Ico_Ex_LeagueOff;
btnLeague = new C4GUI::CallbackButton<C4GameOptionButtons, C4GUI::IconButton>(eLeagueIcon, caButtons.GetFromLeft(iIconSize, iIconSize), 'L' /* 2do */, &C4GameOptionButtons::OnBtnLeague, this);
btnLeague->SetToolTip(LoadResStr("IDS_DLGTIP_STARTLEAGUEGAME"));
btnLeague = new C4GUI::CallbackButton<C4GameOptionButtons, C4GUI::IconButton>(eLeagueIcon, caButtons.GetFromLeft(iIconSize, iIconSize), LoadResStr("IDS_DLGTIP_STARTLEAGUEGAME"), &C4GameOptionButtons::OnBtnLeague, this);
btnLeague->SetEnabled(fHost && !fLobby);
AddElement(btnLeague);
}
else btnLeague=NULL;
if (fNetwork && fHost)
{
btnPassword = new C4GUI::CallbackButton<C4GameOptionButtons, C4GUI::IconButton>(::Network.isPassworded() ? C4GUI::Ico_Ex_Locked : C4GUI::Ico_Ex_Unlocked, caButtons.GetFromLeft(iIconSize, iIconSize), 'P' /* 2do */, &C4GameOptionButtons::OnBtnPassword, this);
btnPassword->SetToolTip(LoadResStr("IDS_NET_PASSWORD_DESC"));
btnPassword = new C4GUI::CallbackButton<C4GameOptionButtons, C4GUI::IconButton>(::Network.isPassworded() ? C4GUI::Ico_Ex_Locked : C4GUI::Ico_Ex_Unlocked, caButtons.GetFromLeft(iIconSize, iIconSize), LoadResStr("IDS_NET_PASSWORD_DESC"), &C4GameOptionButtons::OnBtnPassword, this);
AddElement(btnPassword);
btnComment = new C4GUI::CallbackButton<C4GameOptionButtons, C4GUI::IconButton>(C4GUI::Ico_Ex_Comment, caButtons.GetFromLeft(iIconSize, iIconSize), 'M' /* 2do */, &C4GameOptionButtons::OnBtnComment, this);
btnComment->SetToolTip(LoadResStr("IDS_DESC_COMMENTDESCRIPTIONFORTHIS"));
btnComment = new C4GUI::CallbackButton<C4GameOptionButtons, C4GUI::IconButton>(C4GUI::Ico_Ex_Comment, caButtons.GetFromLeft(iIconSize, iIconSize), LoadResStr("IDS_DESC_COMMENTDESCRIPTIONFORTHIS"), &C4GameOptionButtons::OnBtnComment, this);
AddElement(btnComment);
}
else btnPassword=btnComment=NULL;
btnRecord = new C4GUI::CallbackButton<C4GameOptionButtons, C4GUI::IconButton>(Game.Record || fIsLeague ? C4GUI::Ico_Ex_RecordOn : C4GUI::Ico_Ex_RecordOff, caButtons.GetFromLeft(iIconSize, iIconSize), 'R' /* 2do */, &C4GameOptionButtons::OnBtnRecord, this);
btnRecord = new C4GUI::CallbackButton<C4GameOptionButtons, C4GUI::IconButton>(Game.Record || fIsLeague ? C4GUI::Ico_Ex_RecordOn : C4GUI::Ico_Ex_RecordOff, caButtons.GetFromLeft(iIconSize, iIconSize), LoadResStr("IDS_DLGTIP_RECORD"), &C4GameOptionButtons::OnBtnRecord, this);
btnRecord->SetEnabled(!fIsLeague);
btnRecord->SetToolTip(LoadResStr("IDS_DLGTIP_RECORD"));
AddElement(btnRecord);
}