Unicode fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -86,7 +86,7 @@ void ScoreCanvas::OnDraw(wxDC& dc)
|
|||||||
{
|
{
|
||||||
dc.SetFont(* m_font);
|
dc.SetFont(* m_font);
|
||||||
|
|
||||||
const char* str = m_text;
|
const wxChar* str = m_text;
|
||||||
unsigned int tab = 0;
|
unsigned int tab = 0;
|
||||||
unsigned int tabstops[] = { 5, 100, 150, 200 };
|
unsigned int tabstops[] = { 5, 100, 150, 200 };
|
||||||
|
|
||||||
@@ -94,15 +94,15 @@ void ScoreCanvas::OnDraw(wxDC& dc)
|
|||||||
int lineSpacing;
|
int lineSpacing;
|
||||||
{
|
{
|
||||||
long w, h;
|
long w, h;
|
||||||
dc.GetTextExtent("Testing", &w, &h);
|
dc.GetTextExtent(wxT("Testing"), &w, &h);
|
||||||
lineSpacing = (int)h;
|
lineSpacing = (int)h;
|
||||||
}
|
}
|
||||||
|
|
||||||
int y = 0;
|
int y = 0;
|
||||||
while (*str)
|
while (*str)
|
||||||
{
|
{
|
||||||
char text[256];
|
wxChar text[256];
|
||||||
char* dest = text;
|
wxChar* dest = text;
|
||||||
|
|
||||||
while (*str && *str >= ' ') *dest++ = *str++;
|
while (*str && *str >= ' ') *dest++ = *str++;
|
||||||
*dest = '\0';
|
*dest = '\0';
|
||||||
@@ -133,7 +133,7 @@ ScoreDialog::ScoreDialog(
|
|||||||
wxWindow* parent,
|
wxWindow* parent,
|
||||||
ScoreFile* file
|
ScoreFile* file
|
||||||
) :
|
) :
|
||||||
wxDialog(parent, -1, "Scores",
|
wxDialog(parent, -1, _("Scores"),
|
||||||
wxDefaultPosition, wxSize(310, 200),
|
wxDefaultPosition, wxSize(310, 200),
|
||||||
wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE),
|
wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE),
|
||||||
m_scoreFile(file)
|
m_scoreFile(file)
|
||||||
@@ -142,7 +142,7 @@ ScoreDialog::ScoreDialog(
|
|||||||
SetAutoLayout (TRUE);
|
SetAutoLayout (TRUE);
|
||||||
|
|
||||||
ScoreCanvas* list = new ScoreCanvas(this, m_scoreFile);
|
ScoreCanvas* list = new ScoreCanvas(this, m_scoreFile);
|
||||||
m_OK = new wxButton(this, wxID_OK, "OK");
|
m_OK = new wxButton(this, wxID_OK, _("OK"));
|
||||||
|
|
||||||
wxLayoutConstraints* layout;
|
wxLayoutConstraints* layout;
|
||||||
|
|
||||||
|
@@ -181,11 +181,11 @@ LifeAboutDialog::LifeAboutDialog(wxWindow *parent)
|
|||||||
wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL );
|
||||||
sizer->Add( sbmp, 0, wxCENTRE | wxALL, 10 );
|
sizer->Add( sbmp, 0, wxCENTRE | wxALL, 10 );
|
||||||
sizer->Add( new wxStaticLine(this, -1), 0, wxGROW | wxLEFT | wxRIGHT, 5 );
|
sizer->Add( new wxStaticLine(this, -1), 0, wxGROW | wxLEFT | wxRIGHT, 5 );
|
||||||
sizer->Add( CreateTextSizer(_("Life! version 2.2 for wxWindows\n\n"
|
sizer->Add( CreateTextSizer(_("Life! version 2.2 for wxWindows\n\n\
|
||||||
"(c) 2000 Guillermo Rodriguez Garcia\n\n"
|
(c) 2000 Guillermo Rodriguez Garcia\n\n\
|
||||||
"<guille@iies.es>\n\n"
|
<guille@iies.es>\n\n\
|
||||||
"Portions of the code are based in XLife;\n"
|
Portions of the code are based in XLife;\n\
|
||||||
"XLife is (c) 1989 by Jon Bennett et al.")),
|
XLife is (c) 1989 by Jon Bennett et al.")),
|
||||||
0, wxCENTRE | wxALL, 20 );
|
0, wxCENTRE | wxALL, 20 );
|
||||||
sizer->Add( new wxStaticLine(this, -1), 0, wxGROW | wxLEFT | wxRIGHT, 5 );
|
sizer->Add( new wxStaticLine(this, -1), 0, wxGROW | wxLEFT | wxRIGHT, 5 );
|
||||||
sizer->Add( CreateButtonSizer(wxOK), 0, wxCENTRE | wxALL, 10 );
|
sizer->Add( CreateButtonSizer(wxOK), 0, wxCENTRE | wxALL, 10 );
|
||||||
|
@@ -27,20 +27,14 @@ const LifePattern g_patterns[] =
|
|||||||
{
|
{
|
||||||
LifePattern(
|
LifePattern(
|
||||||
_("Glider"),
|
_("Glider"),
|
||||||
_("The glider is the first of a series of life forms, known "
|
_("The glider is the first of a series of life forms, known as spaceships or fishes, which can travel along the game field retaining their original shape."),
|
||||||
"as spaceships or fishes, which can travel along the game "
|
|
||||||
"field retaining their original shape."),
|
|
||||||
3, 3,
|
3, 3,
|
||||||
".*."
|
".*."
|
||||||
"..*"
|
"..*"
|
||||||
"***"),
|
"***"),
|
||||||
LifePattern(
|
LifePattern(
|
||||||
_("Heavyweight spaceship"),
|
_("Heavyweight spaceship"),
|
||||||
_("The glider is just the smaller of the spaceships; this "
|
_("The glider is just the smaller of the spaceships; this one, known as the heavyweight spaceship or 'big fish', is the largest spaceship which can travel alone without destroying itself. Larger ones can only travel safely if they are supported by smaller spaceships."),
|
||||||
"one, known as the heavyweight spaceship or 'big fish', "
|
|
||||||
"is the largest spaceship which can travel alone without "
|
|
||||||
"destroying itself. Larger ones can only travel safely "
|
|
||||||
"if they are supported by smaller spaceships."),
|
|
||||||
7, 4,
|
7, 4,
|
||||||
".....*."
|
".....*."
|
||||||
"......*"
|
"......*"
|
||||||
@@ -48,10 +42,7 @@ const LifePattern g_patterns[] =
|
|||||||
".******"),
|
".******"),
|
||||||
LifePattern(
|
LifePattern(
|
||||||
_("Eater"),
|
_("Eater"),
|
||||||
_("An eater is any still life that can repair itself from "
|
_("An eater is any still life that can repair itself from some attacks. This one (bottom right), also known as 'fishhook', eats gliders and fishes (spaceships) provided that they approach in a certain angle."),
|
||||||
"some attacks. This one (bottom right), also known as "
|
|
||||||
"'fishhook', eats gliders and fishes (spaceships) provided "
|
|
||||||
"that they approach in a certain angle."),
|
|
||||||
10, 10,
|
10, 10,
|
||||||
".*........"
|
".*........"
|
||||||
"..*......."
|
"..*......."
|
||||||
@@ -65,9 +56,7 @@ const LifePattern g_patterns[] =
|
|||||||
"........**" ),
|
"........**" ),
|
||||||
LifePattern(
|
LifePattern(
|
||||||
_("Dice shaker"),
|
_("Dice shaker"),
|
||||||
_("Oscillators have been extensively explored in Life!. "
|
_("Oscillators have been extensively explored in Life!. The dice shaker turns around each seven tics; thus, it is an oscillator with a period of fourteen."),
|
||||||
"The dice shaker turns around each seven tics; thus, it "
|
|
||||||
"is an oscillator with a period of fourteen."),
|
|
||||||
7, 6,
|
7, 6,
|
||||||
".**.**."
|
".**.**."
|
||||||
".**.**."
|
".**.**."
|
||||||
@@ -77,10 +66,7 @@ const LifePattern g_patterns[] =
|
|||||||
"**...**" ),
|
"**...**" ),
|
||||||
LifePattern(
|
LifePattern(
|
||||||
_("Hertz oscillator"),
|
_("Hertz oscillator"),
|
||||||
_("The Hertz oscillator is a good example of a set of life "
|
_("The Hertz oscillator is a good example of a set of life patterns known as 'billiard tables'. A billiard table is an oscillator which is built inside a stable border. In particular, this one has a period of eight."),
|
||||||
"patterns known as 'billiard tables'. A billiard table is "
|
|
||||||
"an oscillator which is built inside a stable border. In "
|
|
||||||
"particular, this one has a period of eight."),
|
|
||||||
14, 11,
|
14, 11,
|
||||||
".....**......."
|
".....**......."
|
||||||
".....**......."
|
".....**......."
|
||||||
@@ -95,9 +81,7 @@ const LifePattern g_patterns[] =
|
|||||||
".......**....." ),
|
".......**....." ),
|
||||||
LifePattern(
|
LifePattern(
|
||||||
_("Phoenix"),
|
_("Phoenix"),
|
||||||
_("A phoenix is a pattern whose cells all die in every "
|
_("A phoenix is a pattern whose cells all die in every generation, and yet lives forever. For example, this is a phoenix with period two."),
|
||||||
"generation, and yet lives forever. For example, this is "
|
|
||||||
"a phoenix with period two."),
|
|
||||||
8, 8,
|
8, 8,
|
||||||
"....*..."
|
"....*..."
|
||||||
"..*.*..."
|
"..*.*..."
|
||||||
@@ -109,22 +93,14 @@ const LifePattern g_patterns[] =
|
|||||||
"...*...." ),
|
"...*...." ),
|
||||||
LifePattern(
|
LifePattern(
|
||||||
_("R-pentomino"),
|
_("R-pentomino"),
|
||||||
_("The R-pentomino is a methuselah - a life form which "
|
_("The R-pentomino is a methuselah - a life form which lives for hundreds of generations without stabilizing or dying. In particular, the R-Pentomino requires more than one thousand tics to reach a stable (periodic) state."),
|
||||||
"lives for hundreds of generations without stabilizing "
|
|
||||||
"or dying. In particular, the R-Pentomino requires more "
|
|
||||||
"than one thousand tics to reach a stable (periodic) "
|
|
||||||
"state."),
|
|
||||||
3, 3,
|
3, 3,
|
||||||
".**"
|
".**"
|
||||||
"**."
|
"**."
|
||||||
".*." ),
|
".*." ),
|
||||||
LifePattern(
|
LifePattern(
|
||||||
_("Thunderbird"),
|
_("Thunderbird"),
|
||||||
_("The thunderbird is another popular methuselah, which "
|
_("The thunderbird is another popular methuselah, which doesn't stabilize until the 243th generation. Note that because the initial configuration is symmetrical with respect to the vertical axis, all generations must be symmetrical as well."),
|
||||||
"doesn't stabilize until the 243th generation. Note that "
|
|
||||||
"because the initial configuration is symmetrical with "
|
|
||||||
"respect to the vertical axis, all generations must be "
|
|
||||||
"symmetrical as well."),
|
|
||||||
3, 5,
|
3, 5,
|
||||||
"***"
|
"***"
|
||||||
"..."
|
"..."
|
||||||
@@ -133,17 +109,14 @@ const LifePattern g_patterns[] =
|
|||||||
".*." ),
|
".*." ),
|
||||||
LifePattern(
|
LifePattern(
|
||||||
_("Accorn"),
|
_("Accorn"),
|
||||||
_("Probably the most popular methuselah, the accorn lives "
|
_("Probably the most popular methuselah, the accorn lives for 5206 (!) generations."),
|
||||||
"for 5206 (!) generations."),
|
|
||||||
7, 3,
|
7, 3,
|
||||||
".*....."
|
".*....."
|
||||||
"...*..."
|
"...*..."
|
||||||
"**..***" ),
|
"**..***" ),
|
||||||
LifePattern(
|
LifePattern(
|
||||||
_("Galaxy"),
|
_("Galaxy"),
|
||||||
_("One from my personal collection. It is really beautiful "
|
_("One from my personal collection. It is really beautiful to see this configuration expand and shrink periodically for hundreds of tics before reaching a stable state."),
|
||||||
"to see this configuration expand and shrink periodically "
|
|
||||||
"for hundreds of tics before reaching a stable state."),
|
|
||||||
13, 13,
|
13, 13,
|
||||||
"...***......."
|
"...***......."
|
||||||
"......*......"
|
"......*......"
|
||||||
@@ -160,11 +133,7 @@ const LifePattern g_patterns[] =
|
|||||||
".......***..." ),
|
".......***..." ),
|
||||||
LifePattern(
|
LifePattern(
|
||||||
_("Glider gun"),
|
_("Glider gun"),
|
||||||
_("A gun is a stationary pattern that emits spaceships "
|
_("A gun is a stationary pattern that emits spaceships forever. The glider gun shown here was the first known gun, and indeed the first known finite pattern with unbounded growth. It was found by Bill Gosper in November 1970. Many new guns have since been found."),
|
||||||
"forever. The glider gun shown here was the first known "
|
|
||||||
"gun, and indeed the first known finite pattern with "
|
|
||||||
"unbounded growth. It was found by Bill Gosper in "
|
|
||||||
"November 1970. Many new guns have since been found."),
|
|
||||||
36, 9,
|
36, 9,
|
||||||
".........................*.........."
|
".........................*.........."
|
||||||
"......................****.........."
|
"......................****.........."
|
||||||
@@ -177,13 +146,7 @@ const LifePattern g_patterns[] =
|
|||||||
".............*......................" ),
|
".............*......................" ),
|
||||||
LifePattern(
|
LifePattern(
|
||||||
_("Puffer train"),
|
_("Puffer train"),
|
||||||
_("A puffer is an object that moves like a spaceship, except "
|
_("A puffer is an object that moves like a spaceship, except that it leaves a trail of debris behind. The puffer train is one of the best-known puffers. Originally found by Bill Gosper, this is a very dirty puffer; the tail does not stabilize until generation 5533. It consists of a B-heptomino (the middle pattern) escorted by two light weight space ships."),
|
||||||
"that it leaves a trail of debris behind. The puffer train "
|
|
||||||
"is one of the best-known puffers. Originally found by "
|
|
||||||
"Bill Gosper, this is a very dirty puffer; the tail does "
|
|
||||||
"not stabilize until generation 5533. It consists of a "
|
|
||||||
"B-heptomino (the middle pattern) escorted by two light "
|
|
||||||
"weight space ships."),
|
|
||||||
5, 18,
|
5, 18,
|
||||||
"...*."
|
"...*."
|
||||||
"....*"
|
"....*"
|
||||||
@@ -205,23 +168,7 @@ const LifePattern g_patterns[] =
|
|||||||
".****" ),
|
".****" ),
|
||||||
LifePattern(
|
LifePattern(
|
||||||
_("Max"),
|
_("Max"),
|
||||||
_("Max is the fastest-growing known pattern in Conway's Game "
|
_("Max is the fastest-growing known pattern in Conway's Game of Life (possibly the fastest possible). It fills space to a density of 1/2, conjectured to be the maximum density, and does it at a speed of c/2 in each of the 4 directions, which has been proven to be the maximum possible speed.\n\nPopulation growth is:\n[(t+19)^2+463]/4 for t divisible by 4;\n[(t+19)^2+487]/4 for t even, not div. by 4;\n[(t+18)^2+639]/4 for t odd.\n\nOriginal construction, top/bottom stretchers by Hartmut Holzwart; Size optimization, left/right stretchers by David Bell; Original idea, middle part, left/right stretcher connection by Al Hensel.\n\nThis spacefiller by David Bell, September 1993."),
|
||||||
"of Life (possibly the fastest possible). It fills space to "
|
|
||||||
"a density of 1/2, conjectured to be the maximum density, "
|
|
||||||
"and does it at a speed of c/2 in each of the 4 directions, "
|
|
||||||
"which has been proven to be the maximum possible speed.\n"
|
|
||||||
"\n"
|
|
||||||
"Population growth is:\n"
|
|
||||||
"[(t+19)^2+463]/4 for t divisible by 4;\n"
|
|
||||||
"[(t+19)^2+487]/4 for t even, not div. by 4;\n"
|
|
||||||
"[(t+18)^2+639]/4 for t odd.\n"
|
|
||||||
"\n"
|
|
||||||
"Original construction, top/bottom stretchers by Hartmut "
|
|
||||||
"Holzwart; Size optimization, left/right stretchers by David "
|
|
||||||
"Bell; Original idea, middle part, left/right stretcher "
|
|
||||||
"connection by Al Hensel.\n"
|
|
||||||
"\n"
|
|
||||||
"This spacefiller by David Bell, September 1993."),
|
|
||||||
29, 43,
|
29, 43,
|
||||||
".....*.*....................."
|
".....*.*....................."
|
||||||
"....*..*....................."
|
"....*..*....................."
|
||||||
|
Reference in New Issue
Block a user