Moved set/clear place view calls into separate methods in order to
override the behavior in subclasses. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4501 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -125,7 +125,7 @@ public /*abstract*/ class PlaceController extends Controller
|
|||||||
// let the UI hierarchy know that we've got our place
|
// let the UI hierarchy know that we've got our place
|
||||||
PlaceViewUtil.dispatchWillEnterPlace(_view, plobj);
|
PlaceViewUtil.dispatchWillEnterPlace(_view, plobj);
|
||||||
// and display the user interface
|
// and display the user interface
|
||||||
_ctx.setPlaceView(_view);
|
setPlaceView();
|
||||||
}
|
}
|
||||||
|
|
||||||
// let our delegates know what's up
|
// let our delegates know what's up
|
||||||
@@ -172,7 +172,7 @@ public /*abstract*/ class PlaceController extends Controller
|
|||||||
// let the UI hierarchy know that we're outta here
|
// let the UI hierarchy know that we're outta here
|
||||||
if (_view != null ) {
|
if (_view != null ) {
|
||||||
PlaceViewUtil.dispatchDidLeavePlace(_view, plobj);
|
PlaceViewUtil.dispatchDidLeavePlace(_view, plobj);
|
||||||
_ctx.clearPlaceView(_view);
|
clearPlaceView();
|
||||||
_view = null;
|
_view = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,6 +221,23 @@ public /*abstract*/ class PlaceController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the place view. By default, this simply calls {CrowdContext#setPlaceView},
|
||||||
|
* but subclasses can override the method to add the place view in some other way.
|
||||||
|
*/
|
||||||
|
protected function setPlaceView () :void
|
||||||
|
{
|
||||||
|
_ctx.setPlaceView(_view);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears out the place view. By default, this calls {CrowdContext#clearPlaceView}.
|
||||||
|
*/
|
||||||
|
protected function clearPlaceView () :void
|
||||||
|
{
|
||||||
|
_ctx.clearPlaceView(_view);
|
||||||
|
}
|
||||||
|
|
||||||
/** A reference to the active client context. */
|
/** A reference to the active client context. */
|
||||||
protected var _ctx :CrowdContext;
|
protected var _ctx :CrowdContext;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user