Directly use MapView contructor
This commit is contained in:
parent
3c995acde8
commit
657f3ea479
2 changed files with 1 additions and 5 deletions
|
@ -58,10 +58,6 @@ public:
|
|||
Model::Position getViewPosition(uint64_t time) {
|
||||
return map->getPlayerEntity()->getPosition(time);
|
||||
}
|
||||
|
||||
std::shared_ptr<View::MapView> initView(const std::shared_ptr<View::Window> &window) {
|
||||
return std::make_shared<View::MapView>(window, map);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ void RPGEdit::run() {
|
|||
ctx = std::make_shared<MapContext>(&eventBus, &inputHandler, map);
|
||||
|
||||
window = std::make_shared<View::Window>();
|
||||
mapView = ctx->initView(window);
|
||||
mapView = std::make_shared<View::MapView>(window, map);
|
||||
|
||||
eventThread = std::thread([this] { eventLoop(); });
|
||||
|
||||
|
|
Reference in a new issue