Update makefile to actually work. Add reset button in play_state (r)

This commit is contained in:
rexy712 2022-01-17 13:58:39 -08:00
parent 21137971ca
commit 512cd70145
2 changed files with 3 additions and 1 deletions

View File

@ -19,7 +19,7 @@ ifeq ($(OS),Windows_NT)
WINDOWS::=1
endif
SOURCE_DIRS::=src src/audio src/audio/impl src/graphics src/engine
SOURCE_DIRS::=src src/audio src/audio/impl src/graphics src/engine src/ttt
SOURCES::=
OBJDIR::=obj
DEPDIR::=$(OBJDIR)/dep

View File

@ -74,6 +74,8 @@ void play_state::handle_input(const egn::input_event& ev){
return;
}else if(ev.key == GLFW_KEY_ESCAPE && !ev.mods && ev.action == GLFW_PRESS){
m_owner->on_notify({egn::game_state_event::state_type::SHOULD_CLOSE, 0, 0});
}else if(ev.key == GLFW_KEY_R && !ev.mods && ev.action == GLFW_PRESS){
static_cast<board&>(*m_scene.objects[0]).reset();
}
}else if(ev.ev_type == egn::input_event::type::RESIZE){
if(ev.x > ev.y){