diff --git a/src/gui/main_window.cpp b/src/gui/main_window.cpp index ab68312..1d629d0 100644 --- a/src/gui/main_window.cpp +++ b/src/gui/main_window.cpp @@ -7,11 +7,10 @@ namespace mc { MainWindow::MainWindow (int icon_size, int icon_fps) : - m_frm(), - m_grid1(m_frm, 3, true), - m_grid2(m_frm, 3, true), - m_label1(m_frm, "Slot 1"), - m_label2(m_frm, "Slot 2"), + m_grid1(*this, 3, true), + m_grid2(*this, 3, true), + m_label1(*this, "Slot 1"), + m_label2(*this, "Slot 2"), m_icon_size(icon_size), m_icon_fps(icon_fps) { @@ -37,16 +36,12 @@ MainWindow::MainWindow (int icon_size, int icon_fps) : m_grid2.emplace_back(duck::make_nana_animation(mc2[z], m_icon_size, m_icon_size, m_icon_fps)); } - m_frm.div("fit margin=3 "); - m_frm["slot1"] << m_label1 << m_grid1; - m_frm["slot2"] << m_label2 << m_grid2; - m_frm.collocate(); + this->div("fit margin=3 "); + (*this)["slot1"] << m_label1 << m_grid1; + (*this)["slot2"] << m_label2 << m_grid2; + this->collocate(); //const MemoryCard mc(std::ifstream("/home/michele/emu/psx/WipEout 3 - Special Edition (Europe) (En,Fr,De,Es,It).srm", std::ios::binary)); //MemoryCard mc(std::ifstream("/home/michele/emu/psx/Rapid Racer (Europe) (En,Fr,De,Es,It).srm", std::ios::binary)); } - -void MainWindow::show() { - m_frm.show(); -} } //namespace mc diff --git a/src/gui/main_window.hpp b/src/gui/main_window.hpp index 36ec0cf..32f189e 100644 --- a/src/gui/main_window.hpp +++ b/src/gui/main_window.hpp @@ -5,13 +5,11 @@ #include namespace mc { -class MainWindow { +class MainWindow : public nana::form { public: MainWindow (int icon_size, int icon_fps); - void show(); private: - nana::form m_frm; duck::widget::BlockGrid m_grid1; duck::widget::BlockGrid m_grid2; nana::label m_label1;