Moved the camera into the scene where it belongs.
This commit is contained in:
parent
c71566048e
commit
5676382fbb
5 changed files with 29 additions and 27 deletions
15
boss/ui.cpp
15
boss/ui.cpp
|
|
@ -22,7 +22,6 @@ namespace boss {
|
|||
$view_sprite($view_texture.getTexture())
|
||||
{
|
||||
$view_sprite.setPosition({BOSS_VIEW_X, BOSS_VIEW_Y});
|
||||
$camera.style("shake");
|
||||
}
|
||||
|
||||
void UI::init() {
|
||||
|
|
@ -80,7 +79,6 @@ namespace boss {
|
|||
$combat_ui.render(*$window);
|
||||
|
||||
$arena.render($view_texture);
|
||||
$camera.render($view_texture);
|
||||
$view_texture.display();
|
||||
$window->draw($view_sprite);
|
||||
}
|
||||
|
|
@ -115,17 +113,4 @@ namespace boss {
|
|||
$arena.apply_effect(actor, "flame");
|
||||
}
|
||||
}
|
||||
|
||||
void UI::zoom(const std::string &cell_name, double ratio) {
|
||||
if(cell_name == "") {
|
||||
dbc::log("!!!!!!!!! you should add this to guecs");
|
||||
$camera.reset($view_texture, BOSS_VIEW_WIDTH, BOSS_VIEW_HEIGHT);
|
||||
} else {
|
||||
auto& cell = $arena.$ui.cell_for(cell_name);
|
||||
|
||||
$camera.resize(double(BOSS_VIEW_WIDTH)/ratio, double(BOSS_VIEW_HEIGHT)/ratio);
|
||||
$camera.move(float(cell.mid_x), float(cell.mid_y));
|
||||
$camera.play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue