Combat instances are created alongside the barriers

This commit is contained in:
2016-05-29 02:15:41 +10:00
parent 867a86fd79
commit 8d2fc45d7d
5 changed files with 42 additions and 30 deletions
-10
View File
@@ -77,16 +77,12 @@ World::World(int* const argClientIndex, int* const argAccountIndex):
disconnectButton.SetText(GetRenderer(), font, WHITE, "Disconnect");
shutdownButton.SetBackgroundTexture(GetRenderer(), buttonImage.GetTexture());
shutdownButton.SetText(GetRenderer(), font, WHITE, "Shutdown");
inventoryButton.SetBackgroundTexture(GetRenderer(), buttonImage.GetTexture());
inventoryButton.SetText(GetRenderer(), font, WHITE, "Inventory");
//set the button positions
disconnectButton.SetX(50);
disconnectButton.SetY(50);
shutdownButton.SetX(50);
shutdownButton.SetY(70);
inventoryButton.SetX(50);
inventoryButton.SetY(90);
//load the tilesheet
//TODO: (2) Tile size and tile sheet should be loaded elsewhere
@@ -270,7 +266,6 @@ void World::RenderFrame(SDL_Renderer* renderer) {
//draw UI
disconnectButton.DrawTo(renderer);
shutdownButton.DrawTo(renderer);
inventoryButton.DrawTo(renderer);
//FPS
fpsTextLine.DrawTo(renderer);
@@ -295,13 +290,11 @@ void World::QuitEvent() {
void World::MouseMotion(SDL_MouseMotionEvent const& event) {
disconnectButton.MouseMotion(event);
shutdownButton.MouseMotion(event);
inventoryButton.MouseMotion(event);
}
void World::MouseButtonDown(SDL_MouseButtonEvent const& event) {
disconnectButton.MouseButtonDown(event);
shutdownButton.MouseButtonDown(event);
inventoryButton.MouseButtonDown(event);
}
void World::MouseButtonUp(SDL_MouseButtonEvent const& event) {
@@ -311,9 +304,6 @@ void World::MouseButtonUp(SDL_MouseButtonEvent const& event) {
if (shutdownButton.MouseButtonUp(event) == Button::State::RELEASED) {
SendAdminShutdownRequest();
}
if (inventoryButton.MouseButtonUp(event) == Button::State::RELEASED) {
//TODO: show the inventory screen
}
}
void World::MouseWheel(SDL_MouseWheelEvent const& event) {
-1
View File
@@ -143,7 +143,6 @@ private:
TTF_Font* font = nullptr;
Button disconnectButton;
Button shutdownButton;
Button inventoryButton;
FrameRate fps;
TextLine fpsTextLine;