Skip to content

Commit

Permalink
Add stringlistmodel.hpp to simplify listmodel usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Nov 13, 2024
1 parent 85989b7 commit e571d88
Show file tree
Hide file tree
Showing 8 changed files with 257 additions and 290 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ SET(GUISAN_HEADERS
include/guisan/rectangle.hpp
include/guisan/selectionevent.hpp
include/guisan/selectionlistener.hpp
include/guisan/stringlistmodel.hpp
include/guisan/text.hpp
include/guisan/widget.hpp
include/guisan/widgetlistener.hpp
Expand Down
1 change: 1 addition & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ common_headers = [
'include/guisan/sdl.hpp',
'include/guisan/selectionevent.hpp',
'include/guisan/selectionlistener.hpp',
'include/guisan/stringlistmodel.hpp',
'include/guisan/text.hpp',
'include/guisan/widget.hpp',
'include/guisan/widgetlistener.hpp',
Expand Down
19 changes: 9 additions & 10 deletions demo/ff/include/ffdemo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
#include "ffcontainer.hpp"
#include "fflistbox.hpp"
#include "ffscrollarea.hpp"
#include "stringlistmodel.hpp"

class FFDemo : public gcn::ActionListener, public gcn::KeyListener
{
Expand Down Expand Up @@ -112,12 +111,12 @@ class FFDemo : public gcn::ActionListener, public gcn::KeyListener
std::unique_ptr<FFListBox> mMagicSkillsList;
std::unique_ptr<FFScrollArea> mMagicSkillsScroll;

std::unique_ptr<StringListModel> mPerSkills;
std::unique_ptr<StringListModel> mPerMagic;
std::unique_ptr<StringListModel> mOlofSkills;
std::unique_ptr<StringListModel> mOlofMagic;
std::unique_ptr<StringListModel> mTomasSkills;
std::unique_ptr<StringListModel> mTomasMagic;
gcn::StringListModel mPerSkills;
gcn::StringListModel mPerMagic;
gcn::StringListModel mOlofSkills;
gcn::StringListModel mOlofMagic;
gcn::StringListModel mTomasSkills;
gcn::StringListModel mTomasMagic;

std::unique_ptr<gcn::TextBox> mPerInfo1;
std::unique_ptr<gcn::TextBox> mOlofInfo1;
Expand Down Expand Up @@ -145,9 +144,9 @@ class FFDemo : public gcn::ActionListener, public gcn::KeyListener

std::unique_ptr<FFListBox> mItemsList;
std::unique_ptr<FFScrollArea> mItemsScrollArea;
std::unique_ptr<StringListModel> mItemsListModel;
std::unique_ptr<StringListModel> mItemsInfoListModel;
std::unique_ptr<StringListModel> mMenuListModel;
gcn::StringListModel mItemsListModel;
gcn::StringListModel mItemsInfoListModel;
gcn::StringListModel mMenuListModel;

std::unique_ptr<FFCharacterChooser> mCharacterChooser;
};
Expand Down
67 changes: 0 additions & 67 deletions demo/ff/include/stringlistmodel.hpp

This file was deleted.

Loading

0 comments on commit e571d88

Please sign in to comment.