diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-08-10 00:41:52 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-09-03 17:02:24 +0200 |
| commit | c97de27f9c5364b6f126016c5e1f31a76d5ce565 (patch) | |
| tree | f29bd3c22e60f9abdfbe46f145279d9af7aa7256 /hacks | |
| parent | 5ed17cd197aa743922da18e2a5753f746d38122e (diff) | |
Remove use of wxT in favour of char_to_wx().
The wxWidgets docs advise against its use these days.
Diffstat (limited to 'hacks')
| -rw-r--r-- | hacks/gl/basic_gl_pane.cc | 6 | ||||
| -rw-r--r-- | hacks/gl/shader.cc | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/hacks/gl/basic_gl_pane.cc b/hacks/gl/basic_gl_pane.cc index 565bf4cee..d6b01462f 100644 --- a/hacks/gl/basic_gl_pane.cc +++ b/hacks/gl/basic_gl_pane.cc @@ -33,7 +33,7 @@ DrawableThing* sprite; bool MyApp::OnInit() { wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL); - frame = new wxFrame((wxFrame *)NULL, -1, wxT("Hello GL World"), wxPoint(50,50), wxSize(400,200)); + frame = new wxFrame((wxFrame *)NULL, -1, char_to_wx("Hello GL World"), wxPoint(50,50), wxSize(400,200)); int args[] = {WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0}; @@ -72,7 +72,7 @@ void BasicGLPane::keyPressed(wxKeyEvent& event) {} void BasicGLPane::keyReleased(wxKeyEvent& event) {} BasicGLPane::BasicGLPane(wxFrame* parent, int* args) : -wxGLCanvas(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, wxT("GLCanvas"), args) +wxGLCanvas(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, char_to_wx("GLCanvas"), args) { } @@ -150,7 +150,7 @@ void BasicGLPane::render( wxPaintEvent& evt ) if(image == NULL) { - image = new Image( wxT("myfile.png") ); + image = new Image(char_to_wx("myfile.png")); sprite = new DrawableThing(image); } diff --git a/hacks/gl/shader.cc b/hacks/gl/shader.cc index 8d5f5fe70..c6cdb8593 100644 --- a/hacks/gl/shader.cc +++ b/hacks/gl/shader.cc @@ -35,7 +35,7 @@ public: bool OnInit() { auto sizer = new wxBoxSizer(wxHORIZONTAL); - _frame = new wxFrame(nullptr, wxID_ANY, wxT("Hello world")); + _frame = new wxFrame(nullptr, wxID_ANY, char_to_wx("Hello world")); _canvas = new GLCanvas(_frame); sizer->Add(_canvas->get(), 1, wxEXPAND); _frame->SetSizerAndFit(sizer); |
