mirror of https://github.com/AxioDL/metaforce.git
SplitSpace updates
This commit is contained in:
parent
42c96e952e
commit
c826fc58ab
|
@ -176,7 +176,6 @@ class ResourceBrowser : public Space, public Specter::IPathButtonsBinding
|
|||
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));
|
||||
printf("New ResView: %p\n", this);
|
||||
}
|
||||
|
||||
void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub);
|
||||
|
|
|
@ -34,12 +34,13 @@ Specter::View* RootSpace::buildSpaceView(Specter::ViewResources& res)
|
|||
|
||||
Specter::View* SplitSpace::buildContentView(Specter::ViewResources& res)
|
||||
{
|
||||
m_splitView.reset(new Specter::SplitView(res, m_vm.rootView(), m_state.axis));
|
||||
int clearance = res.pixelFactor() * SPECTER_TOOLBAR_GAUGE;
|
||||
m_splitView.reset(new Specter::SplitView(res, m_vm.rootView(), this, m_state.axis,
|
||||
m_state.split, clearance, clearance));
|
||||
if (m_slots[0])
|
||||
m_splitView->setContentView(0, m_slots[0]->buildSpaceView(res));
|
||||
if (m_slots[1])
|
||||
m_splitView->setContentView(1, m_slots[1]->buildSpaceView(res));
|
||||
m_splitView->setSplit(m_state.split);
|
||||
return m_splitView.get();
|
||||
}
|
||||
|
||||
|
|
|
@ -244,16 +244,15 @@ public:
|
|||
std::unique_ptr<Space> exchangeSpaceSplitJoin(Space* removeSpace, std::unique_ptr<Space>&& keepSpace);
|
||||
|
||||
Specter::SplitView* splitView() {return m_splitView.get();}
|
||||
void setSplit(float split)
|
||||
{
|
||||
m_state.split = split;
|
||||
reloadState();
|
||||
}
|
||||
void updateSplit(float split) {m_state.split = split;}
|
||||
void setAxis(Specter::SplitView::Axis axis)
|
||||
{
|
||||
m_state.axis = axis;
|
||||
reloadState();
|
||||
}
|
||||
|
||||
Specter::SplitView::Axis axis() const {return m_state.axis;}
|
||||
float split() const {return m_state.split;}
|
||||
};
|
||||
|
||||
class TestSpace : public Space
|
||||
|
|
|
@ -139,7 +139,8 @@ bool ViewManager::proc()
|
|||
|
||||
if (m_deferSplit)
|
||||
{
|
||||
m_deferSplit->spaceSplit(m_deferSplitAxis, m_deferSplitThisSlot);
|
||||
SplitSpace* ss = static_cast<SplitSpace*>(m_deferSplit->spaceSplit(m_deferSplitAxis, m_deferSplitThisSlot));
|
||||
m_rootView->startSplitDrag(ss->splitView(), m_deferSplitCoord);
|
||||
m_deferSplit = nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ class ViewManager : public Specter::IViewManager
|
|||
Space* m_deferSplit = nullptr;
|
||||
Specter::SplitView::Axis m_deferSplitAxis;
|
||||
int m_deferSplitThisSlot;
|
||||
boo::SWindowCoord m_deferSplitCoord;
|
||||
|
||||
public:
|
||||
ViewManager(HECL::Runtime::FileStoreManager& fileMgr, HECL::CVarManager& cvarMgr);
|
||||
|
@ -68,11 +69,13 @@ public:
|
|||
HECL::Database::Project* project() {return m_projManager.project();}
|
||||
const Specter::Translator* getTranslator() const {return &m_translator;}
|
||||
|
||||
void deferSpaceSplit(Specter::ISpaceController* split, Specter::SplitView::Axis axis, int thisSlot)
|
||||
void deferSpaceSplit(Specter::ISpaceController* split, Specter::SplitView::Axis axis, int thisSlot,
|
||||
const boo::SWindowCoord& coord)
|
||||
{
|
||||
m_deferSplit = static_cast<Space*>(split);
|
||||
m_deferSplitAxis = axis;
|
||||
m_deferSplitThisSlot = thisSlot;
|
||||
m_deferSplitCoord = coord;
|
||||
}
|
||||
|
||||
const std::vector<HECL::SystemString>* recentProjects() const {return &m_recentProjects;}
|
||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
|||
Subproject commit 08bfbddf4db2f4018e8b494aff83795c74857eb7
|
||||
Subproject commit f9edbe58261c36b9e7f02a3f6c6d07708187cd25
|
|
@ -1 +1 @@
|
|||
Subproject commit 77c8e7e4b9317943abfd4366f5f38abf7185dba4
|
||||
Subproject commit b1a8603a85ebc0b762a30391e1db5b43d93215b9
|
Loading…
Reference in New Issue