about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-05-01 17:21:47 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-05-01 17:21:47 -0400
commitd7eb71dc931c812b57d39566f71069a51cb66f4d (patch)
tree7df00a458e343aa6e7ddfe7f31eb93f9a57b6c0e
downloadlingo-ap-tracker-d7eb71dc931c812b57d39566f71069a51cb66f4d.tar.gz
lingo-ap-tracker-d7eb71dc931c812b57d39566f71069a51cb66f4d.tar.bz2
lingo-ap-tracker-d7eb71dc931c812b57d39566f71069a51cb66f4d.zip
Initial commit
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt15
-rw-r--r--main.cpp18
-rw-r--r--tracker_frame.cpp29
-rw-r--r--tracker_frame.h19
5 files changed, 82 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..567609b --- /dev/null +++ b/.gitignore
@@ -0,0 +1 @@
build/
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..dffa7ab --- /dev/null +++ b/CMakeLists.txt
@@ -0,0 +1,15 @@
1cmake_minimum_required (VERSION 3.1)
2project (lingo_ap_tracker)
3
4set(CMAKE_BUILD_TYPE Debug)
5
6find_package(wxWidgets COMPONENTS core base)
7include(${wxWidgets_USE_FILE})
8
9add_executable(lingo_ap_tracker
10 main.cpp
11 tracker_frame.cpp
12)
13set_property(TARGET lingo_ap_tracker PROPERTY CXX_STANDARD 17)
14set_property(TARGET lingo_ap_tracker PROPERTY CXX_STANDARD_REQUIRED ON)
15target_link_libraries(lingo_ap_tracker ${wxWidgets_LIBRARIES})
diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..940fecc --- /dev/null +++ b/main.cpp
@@ -0,0 +1,18 @@
1#include <wx/wxprec.h>
2
3#ifndef WX_PRECOMP
4#include <wx/wx.h>
5#endif
6
7#include "tracker_frame.h"
8
9class TrackerApp : public wxApp {
10public:
11 virtual bool OnInit() {
12 TrackerFrame *frame = new TrackerFrame();
13 frame->Show(true);
14 return true;
15 }
16};
17
18wxIMPLEMENT_APP(TrackerApp);
diff --git a/tracker_frame.cpp b/tracker_frame.cpp new file mode 100644 index 0000000..83f42a6 --- /dev/null +++ b/tracker_frame.cpp
@@ -0,0 +1,29 @@
1#include "tracker_frame.h"
2
3TrackerFrame::TrackerFrame()
4 : wxFrame(nullptr, wxID_ANY, "Lingo Archipelago Tracker") {
5 wxMenu *menuFile = new wxMenu();
6 menuFile->Append(wxID_EXIT);
7
8 wxMenu *menuHelp = new wxMenu();
9 menuHelp->Append(wxID_ABOUT);
10
11 wxMenuBar *menuBar = new wxMenuBar();
12 menuBar->Append(menuFile, "&File");
13 menuBar->Append(menuHelp, "&Help");
14
15 SetMenuBar(menuBar);
16
17 CreateStatusBar();
18 SetStatusText("Not connected to Archipelago.");
19
20 Bind(wxEVT_MENU, &TrackerFrame::OnAbout, this, wxID_ABOUT);
21 Bind(wxEVT_MENU, &TrackerFrame::OnExit, this, wxID_EXIT);
22}
23
24void TrackerFrame::OnAbout(wxCommandEvent &event) {
25 wxMessageBox("Lingo Archipelago Tracker by hatkirby",
26 "About lingo-ap-tracker", wxOK | wxICON_INFORMATION);
27}
28
29void TrackerFrame::OnExit(wxCommandEvent &event) { Close(true); }
diff --git a/tracker_frame.h b/tracker_frame.h new file mode 100644 index 0000000..60ded2e --- /dev/null +++ b/tracker_frame.h
@@ -0,0 +1,19 @@
1#ifndef TRACKER_FRAME_H_86BD8DFB
2#define TRACKER_FRAME_H_86BD8DFB
3
4#include <wx/wxprec.h>
5
6#ifndef WX_PRECOMP
7#include <wx/wx.h>
8#endif
9
10class TrackerFrame : public wxFrame {
11public:
12 TrackerFrame();
13
14private:
15 void OnExit(wxCommandEvent &event);
16 void OnAbout(wxCommandEvent &event);
17};
18
19#endif /* end of include guard: TRACKER_FRAME_H_86BD8DFB */