2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 07:47:42 +00:00

ResourceBrowser additions and app icons

This commit is contained in:
Jack Andersen
2016-01-26 14:44:22 -10:00
parent 3b7037bccc
commit e74c753bd1
19 changed files with 134 additions and 19 deletions

View File

@@ -167,22 +167,27 @@ class ResourceBrowser : public Space, public Specter::IPathButtonsBinding
struct View : Specter::View
{
ResourceBrowser& m_ro;
Specter::ViewChild<std::unique_ptr<Specter::PathButtons>> m_pathButtons;
Specter::ViewChild<std::unique_ptr<Specter::Table>> m_fileListing;
View(ResourceBrowser& ro, Specter::ViewResources& res)
: Specter::View(res, ro.m_vm.rootView()), m_ro(ro)
{
commitResources(res);
m_pathButtons.m_view.reset(new Specter::PathButtons(res, *this, ro));
m_fileListing.m_view.reset(new Specter::Table(res, *this, &ro.m_fileListingBind, &ro.m_fileListingBind, 3));
}
void mouseDown(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
void mouseUp(const boo::SWindowCoord&, boo::EMouseButton, boo::EModifierKey);
void mouseMove(const boo::SWindowCoord&);
void mouseLeave(const boo::SWindowCoord&);
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
void draw(boo::IGraphicsCommandQueue* gfxQ);
};
std::unique_ptr<View> m_view;
std::unique_ptr<Specter::PathButtons> m_pathButtons;
public:
ResourceBrowser(ViewManager& vm, Space* parent)
: Space(vm, Class::ResourceBrowser, parent),
@@ -222,6 +227,12 @@ public:
return new ResourceBrowser(m_vm, parent, *this);
}
void buildToolbarView(Specter::ViewResources &res, Specter::Toolbar &tb)
{
m_pathButtons.reset(new Specter::PathButtons(res, tb, *this, true));
tb.push_back(m_pathButtons.get(), 0);
}
Specter::View* buildContentView(Specter::ViewResources& res)
{
m_view.reset(new View(*this, res));
@@ -232,6 +243,11 @@ public:
{
return true;
}
unsigned toolbarUnits() const
{
return 2;
}
};
}