Skip to content

Commit

Permalink
Reduce las dependencias de vista.h
Browse files Browse the repository at this point in the history
  • Loading branch information
autosquash committed Feb 2, 2024
1 parent 77e1507 commit f7a1a3b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 12 deletions.
13 changes: 9 additions & 4 deletions dev/estructura.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- fase_nivel.h
- shared/log_init.h
- templates/helpers.h
- vista/paneles.h

- enlace_vista/enlace_vista.h:
- modelo_amplio/modelo_amplio.h
Expand Down Expand Up @@ -253,6 +254,7 @@
- motor_nivel.h
- setup_juego.h
- vista/basicos_vista.h
- vista/paneles.h
- vista/vista.h

- textos.cpp:
Expand Down Expand Up @@ -489,16 +491,19 @@
- fase_nivel.h
- shared/dev.h
- shared/log_init.h
- shared/num_nivel.h
- templates/helpers.h
- vista/basicos_vista.h
- vista/botones/botones_app.h
- vista/componentes/boton_con_texto.h
- vista/etiquetas/etiquetas.h
- vista/grid.h
- vista/paneles.h
- vista/vista_data.h

- vista/vista.h:
- vista/botones/botones_app.h
- vista/etiquetas/etiquetas.h
- vista/paneles.h
- shared/num_nivel.h
- vista/componentes/componente.h
- vista/presentacion_vista.h
- vista/presentaciones.h
- vista/vista_shared.h

1 change: 1 addition & 0 deletions src/enlace_vista/enlace_vista.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "../fase_nivel.h"
#include "../shared/log_init.h"
#include "../templates/helpers.h"
#include "../vista/paneles.h"
#include "presentador.h"
#include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/System/Time.hpp>
Expand Down
1 change: 1 addition & 0 deletions src/tests/test_usecases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "../motor_nivel.h"
#include "../setup_juego.h"
#include "../vista/basicos_vista.h"
#include "../vista/paneles.h"
#include "../vista/vista.h"
#include <gtest/gtest.h>

Expand Down
2 changes: 1 addition & 1 deletion src/vista/etiquetas/etiquetas.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Globales;
//////////////////////////////////////////

/* Agrupa las etiquetas principales para un nivel determinado */
struct EtiquetasGenerales : public ComponenteConFont {
class EtiquetasGenerales : public ComponenteConFont {
private:
std::shared_ptr<EtiquetasInfo> info;
std::shared_ptr<EtiquetasBarraEstado> barra_estado;
Expand Down
4 changes: 3 additions & 1 deletion src/vista/vista.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
#include "../fase_nivel.h"
#include "../shared/dev.h"
#include "../shared/log_init.h"
#include "../shared/num_nivel.h"
#include "../templates/helpers.h"
#include "basicos_vista.h"
#include "botones/botones_app.h"
#include "componentes/boton_con_texto.h"
#include "etiquetas/etiquetas.h"
#include "grid.h"
#include "paneles.h"
#include "vista_data.h"
#include <SFML/Graphics/RenderTarget.hpp>
#include <cassert>
Expand Down
15 changes: 9 additions & 6 deletions src/vista/vista.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
#pragma once

// TODO: reducir dependencias
#include "botones/botones_app.h"
#include "etiquetas/etiquetas.h"
#include "paneles.h"
#include "../shared/num_nivel.h"
#include "componentes/componente.h"
#include "presentacion_vista.h"
#include "presentaciones.h"
#include "vista_shared.h"

class BotonesApp;
class EtiquetasGenerales;
enum class FaseNivel;
struct Grid;
class PanelesObservables;
class Paneles;

namespace sf {
class RenderTarget;
class Time;
} // namespace sf

Expand Down Expand Up @@ -59,7 +62,7 @@ class Vista : public ComponenteConFont, public VistaObservable {
void set_presentacion_vista( //
std::shared_ptr<PresentacionVista> //
);

// TODO: revisar si este metodo necesita FaseNivel
void actualizar_interfaz_grafico(
bool mostrando_grid,
FaseNivel fase_actual, //
Expand Down

0 comments on commit f7a1a3b

Please sign in to comment.