Fix unused private field warnings in Forty demo
Fix drawing score list without wxUSE_GRID.
This commit is contained in:
parent
ea102bb272
commit
2aadfd882a
@ -85,7 +85,7 @@ void ScoreCanvas::OnDraw(wxDC& dc)
|
|||||||
{
|
{
|
||||||
dc.SetFont(* m_font);
|
dc.SetFont(* m_font);
|
||||||
|
|
||||||
const wxChar* str = m_text;
|
const wxChar* str = m_text.c_str();
|
||||||
unsigned int tab = 0;
|
unsigned int tab = 0;
|
||||||
unsigned int tabstops[] = { 5, 100, 150, 200 };
|
unsigned int tabstops[] = { 5, 100, 150, 200 };
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ void ScoreCanvas::OnDraw(wxDC& dc)
|
|||||||
while (*str && *str >= ' ') *dest++ = *str++;
|
while (*str && *str >= ' ') *dest++ = *str++;
|
||||||
*dest = '\0';
|
*dest = '\0';
|
||||||
|
|
||||||
dc.DrawText(text, tabstops[tab], y);
|
dc.DrawText(text, FromDIP(tabstops[tab]), y);
|
||||||
|
|
||||||
if (*str == '\t')
|
if (*str == '\t')
|
||||||
{
|
{
|
||||||
@ -131,8 +131,7 @@ wxEND_EVENT_TABLE()
|
|||||||
|
|
||||||
ScoreDialog::ScoreDialog(wxWindow* parent, ScoreFile* file) :
|
ScoreDialog::ScoreDialog(wxWindow* parent, ScoreFile* file) :
|
||||||
wxDialog(parent, wxID_ANY, _("Scores"),
|
wxDialog(parent, wxID_ANY, _("Scores"),
|
||||||
wxDefaultPosition, wxSize(400, 300)),
|
wxDefaultPosition, wxSize(400, 300))
|
||||||
m_scoreFile(file)
|
|
||||||
{
|
{
|
||||||
// create grid with players
|
// create grid with players
|
||||||
wxArrayString players;
|
wxArrayString players;
|
||||||
@ -177,7 +176,7 @@ ScoreDialog::ScoreDialog(wxWindow* parent, ScoreFile* file) :
|
|||||||
list->EnableEditing(false);
|
list->EnableEditing(false);
|
||||||
sz.x = wxDefaultCoord;
|
sz.x = wxDefaultCoord;
|
||||||
#else
|
#else
|
||||||
ScoreCanvas* list = new ScoreCanvas(this, m_scoreFile, wxDefaultPosition, sz);
|
ScoreCanvas* list = new ScoreCanvas(this, file, wxDefaultPosition, sz);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
list->SetInitialSize(sz);
|
list->SetInitialSize(sz);
|
||||||
|
@ -24,9 +24,6 @@ protected:
|
|||||||
void OnCloseWindow(wxCloseEvent& event);
|
void OnCloseWindow(wxCloseEvent& event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ScoreFile* m_scoreFile;
|
|
||||||
wxButton* m_OK;
|
|
||||||
|
|
||||||
wxDECLARE_EVENT_TABLE();
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user