More likely to find the about.htm instructions now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -75,6 +75,7 @@ FortyApp::~FortyApp()
|
|||||||
bool FortyApp::OnInit()
|
bool FortyApp::OnInit()
|
||||||
{
|
{
|
||||||
bool largecards = false;
|
bool largecards = false;
|
||||||
|
m_dir = wxGetCwd();
|
||||||
|
|
||||||
wxSize size(668,510);
|
wxSize size(668,510);
|
||||||
|
|
||||||
@@ -233,7 +234,8 @@ void
|
|||||||
FortyFrame::Help(wxCommandEvent& event)
|
FortyFrame::Help(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
#if wxUSE_HTML
|
#if wxUSE_HTML
|
||||||
if (wxFileExists(wxT("about.htm")))
|
wxString htmlFile = wxGetApp().GetDir() + wxFILE_SEP_PATH + wxT("about.htm");
|
||||||
|
if (wxFileExists(htmlFile))
|
||||||
{
|
{
|
||||||
FortyAboutDialog dialog(this, wxID_ANY, wxT("Forty Thieves Instructions"));
|
FortyAboutDialog dialog(this, wxID_ANY, wxT("Forty Thieves Instructions"));
|
||||||
if (dialog.ShowModal() == wxID_OK)
|
if (dialog.ShowModal() == wxID_OK)
|
||||||
@@ -324,13 +326,9 @@ bool FortyAboutDialog::AddControls(wxWindow* parent)
|
|||||||
{
|
{
|
||||||
#if wxUSE_HTML
|
#if wxUSE_HTML
|
||||||
wxString htmlText;
|
wxString htmlText;
|
||||||
wxString htmlFile(wxT("about.htm"));
|
wxString htmlFile = wxGetApp().GetDir() + wxFILE_SEP_PATH + wxT("about.htm");
|
||||||
|
|
||||||
//if (!wxGetApp().GetMemoryTextResource(wxT("about.htm"), htmlText))
|
|
||||||
{
|
{
|
||||||
// wxSetWorkingDirectory(wxGetApp().GetAppDir());
|
|
||||||
// wxString htmlFile(wxGetApp().GetFullAppPath(wxT("about.htm")));
|
|
||||||
|
|
||||||
wxTextFile file(htmlFile);
|
wxTextFile file(htmlFile);
|
||||||
if (file.Exists())
|
if (file.Exists())
|
||||||
{
|
{
|
||||||
@@ -347,11 +345,6 @@ bool FortyAboutDialog::AddControls(wxWindow* parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Customize the HTML
|
// Customize the HTML
|
||||||
#if 0
|
|
||||||
wxString verString;
|
|
||||||
verString.Printf("%.2f", stVERSION_NUMBER);
|
|
||||||
htmlText.Replace(wxT("$VERSION$"), verString);
|
|
||||||
#endif
|
|
||||||
htmlText.Replace(wxT("$DATE$"), _T(__DATE__));
|
htmlText.Replace(wxT("$DATE$"), _T(__DATE__));
|
||||||
|
|
||||||
wxSize htmlSize(400, 290);
|
wxSize htmlSize(400, 290);
|
||||||
|
@@ -23,13 +23,17 @@ public:
|
|||||||
static const wxColour& BackgroundColour();
|
static const wxColour& BackgroundColour();
|
||||||
static const wxColour& TextColour();
|
static const wxColour& TextColour();
|
||||||
static const wxBrush& BackgroundBrush();
|
static const wxBrush& BackgroundBrush();
|
||||||
|
const wxString& GetDir() const { return m_dir; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static wxColour* m_backgroundColour;
|
static wxColour* m_backgroundColour;
|
||||||
static wxColour* m_textColour;
|
static wxColour* m_textColour;
|
||||||
static wxBrush* m_backgroundBrush;
|
static wxBrush* m_backgroundBrush;
|
||||||
|
wxString m_dir;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DECLARE_APP(FortyApp)
|
||||||
|
|
||||||
class FortyCanvas;
|
class FortyCanvas;
|
||||||
class FortyFrame: public wxFrame
|
class FortyFrame: public wxFrame
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user