aplicar botoes rudimentares na frame accoes
This commit is contained in:
BIN
assets/play_circle_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png
Normal file
BIN
assets/play_circle_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
assets/restart_alt_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png
Normal file
BIN
assets/restart_alt_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
assets/settings_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png
Normal file
BIN
assets/settings_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
assets/step_over_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png
Normal file
BIN
assets/step_over_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
assets/stop_circle_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png
Normal file
BIN
assets/stop_circle_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@ -182,6 +182,62 @@ def actualizarInfoPos(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def mostrarFrameAccoes(janela: pg.Surface, frm: Frame) -> None:
|
||||||
|
frm.desenhar(janela, 5, 10)
|
||||||
|
img_play = pg.image.load(
|
||||||
|
"assets/play_circle_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png"
|
||||||
|
)
|
||||||
|
img_stop = pg.image.load(
|
||||||
|
"assets/stop_circle_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png"
|
||||||
|
)
|
||||||
|
img_step = pg.image.load(
|
||||||
|
"assets/step_over_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png"
|
||||||
|
)
|
||||||
|
img_restart = pg.image.load(
|
||||||
|
"assets/restart_alt_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png"
|
||||||
|
)
|
||||||
|
img_settings = pg.image.load(
|
||||||
|
"assets/settings_64dp_E3E3E3_FILL0_wght400_GRAD0_opsz48.png"
|
||||||
|
)
|
||||||
|
janela.blit(
|
||||||
|
img_play,
|
||||||
|
(
|
||||||
|
frm.posicao[0] + sep_janelas,
|
||||||
|
frm.posicao[1] + ((frm.tamanho[1] - img_play.get_size()[1]) / 2),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
janela.blit(
|
||||||
|
img_step,
|
||||||
|
(
|
||||||
|
frm.posicao[0] + (sep_janelas + img_play.get_size()[0]),
|
||||||
|
frm.posicao[1] + ((frm.tamanho[1] - img_step.get_size()[1]) / 2),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
janela.blit(
|
||||||
|
img_stop,
|
||||||
|
(
|
||||||
|
frm.posicao[0] + ((sep_janelas + img_step.get_size()[0]) * 2),
|
||||||
|
frm.posicao[1] + ((frm.tamanho[1] - img_stop.get_size()[1]) / 2),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
janela.blit(
|
||||||
|
img_restart,
|
||||||
|
(
|
||||||
|
frm.posicao[0] + ((sep_janelas + img_stop.get_size()[0]) * 3),
|
||||||
|
frm.posicao[1] +
|
||||||
|
((frm.tamanho[1] - img_restart.get_size()[1]) / 2),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
janela.blit(
|
||||||
|
img_settings,
|
||||||
|
(
|
||||||
|
frm.posicao[0] + ((sep_janelas + img_restart.get_size()[0]) * 5),
|
||||||
|
frm.posicao[1] +
|
||||||
|
((frm.tamanho[1] - img_settings.get_size()[1]) / 2),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def main(mapa: Mapa | None, tamanho_mapa: tuple[int, int]):
|
def main(mapa: Mapa | None, tamanho_mapa: tuple[int, int]):
|
||||||
if isinstance(mapa, NoneType):
|
if isinstance(mapa, NoneType):
|
||||||
raise TypeError("não foi passado mapa (tipo None)")
|
raise TypeError("não foi passado mapa (tipo None)")
|
||||||
@ -277,6 +333,7 @@ def main(mapa: Mapa | None, tamanho_mapa: tuple[int, int]):
|
|||||||
# mostrar estatisticas
|
# mostrar estatisticas
|
||||||
actualizarEstatisticas(janela, frm_info_mapa, mapa)
|
actualizarEstatisticas(janela, frm_info_mapa, mapa)
|
||||||
# mostrar frame_accoes
|
# mostrar frame_accoes
|
||||||
|
mostrarFrameAccoes(janela, frm_accoes)
|
||||||
pg.display.flip()
|
pg.display.flip()
|
||||||
clock.tick(60)
|
clock.tick(60)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user