[Cleanup] Just a tad bit of cleaning, not been productive today.
This commit is contained in:
parent
854c820140
commit
3437130216
@ -71,11 +71,21 @@ bool Button::CheckMouseOver(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Button::Render(void) {
|
void Button::Render(void) {
|
||||||
|
button.Draw();
|
||||||
|
_text.Render();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Button::Render(int xArg, int yArg) {
|
||||||
|
button.Draw(xArg, yArg);
|
||||||
|
_text.Render(xArg, yArg);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Button::RenderLiteral(void) {
|
||||||
button.DrawLiteral();
|
button.DrawLiteral();
|
||||||
_text.RenderLiteral();
|
_text.RenderLiteral();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Button::Render(int xArg, int yArg) {
|
void Button::RenderLiteral(int xArg, int yArg) {
|
||||||
button.DrawLiteral(xArg, yArg);
|
button.DrawLiteral(xArg, yArg);
|
||||||
_text.RenderLiteral(xArg, yArg);
|
_text.RenderLiteral(xArg, yArg);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,8 @@ public:
|
|||||||
|
|
||||||
void Render(void);
|
void Render(void);
|
||||||
void Render(int xArg, int yArg);
|
void Render(int xArg, int yArg);
|
||||||
|
void RenderLiteral(void);
|
||||||
|
void RenderLiteral(int xArg, int yArg);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SDL_Color _mouseOutColour;
|
SDL_Color _mouseOutColour;
|
||||||
|
@ -7,31 +7,31 @@ IngameMenu::IngameMenu(void) {
|
|||||||
btnResume.SetOverRGB(255, 255, 255);
|
btnResume.SetOverRGB(255, 255, 255);
|
||||||
btnResume.SetTextRGB(0, 0, 0);
|
btnResume.SetTextRGB(0, 0, 0);
|
||||||
btnResume.SetText("Resume Game");
|
btnResume.SetText("Resume Game");
|
||||||
btnResume.SetXY((SCREEN_WIDTH / 2) - (btnResume.GetWidth() / 2), 50);
|
btnResume.SetXY(SCREEN_WIDTH / 2 - btnResume.GetWidth() / 2, 50);
|
||||||
|
|
||||||
btnSaveGame.SetOutRGB(200, 200, 200);
|
btnSaveGame.SetOutRGB(200, 200, 200);
|
||||||
btnSaveGame.SetOverRGB(255, 255, 255);
|
btnSaveGame.SetOverRGB(255, 255, 255);
|
||||||
btnSaveGame.SetTextRGB(0, 0, 0);
|
btnSaveGame.SetTextRGB(0, 0, 0);
|
||||||
btnSaveGame.SetText("SaveGame");
|
btnSaveGame.SetText("SaveGame");
|
||||||
btnSaveGame.SetXY((SCREEN_WIDTH / 2) - (btnSaveGame.GetWidth() / 2), 100);
|
btnSaveGame.SetXY(SCREEN_WIDTH / 2 - btnSaveGame.GetWidth() / 2, 100);
|
||||||
|
|
||||||
btnLoadGame.SetOutRGB(200, 200, 200);
|
btnLoadGame.SetOutRGB(200, 200, 200);
|
||||||
btnLoadGame.SetOverRGB(255, 255, 255);
|
btnLoadGame.SetOverRGB(255, 255, 255);
|
||||||
btnLoadGame.SetTextRGB(0, 0, 0);
|
btnLoadGame.SetTextRGB(0, 0, 0);
|
||||||
btnLoadGame.SetText("LoadGame");
|
btnLoadGame.SetText("LoadGame");
|
||||||
btnLoadGame.SetXY((SCREEN_WIDTH / 2) - (btnLoadGame.GetWidth() / 2), 150);
|
btnLoadGame.SetXY(SCREEN_WIDTH / 2 - btnLoadGame.GetWidth() / 2, 150);
|
||||||
|
|
||||||
btnOptions.SetOutRGB(200, 200, 200);
|
btnOptions.SetOutRGB(200, 200, 200);
|
||||||
btnOptions.SetOverRGB(255, 255, 255);
|
btnOptions.SetOverRGB(255, 255, 255);
|
||||||
btnOptions.SetTextRGB(0, 0, 0);
|
btnOptions.SetTextRGB(0, 0, 0);
|
||||||
btnOptions.SetText("Options");
|
btnOptions.SetText("Options");
|
||||||
btnOptions.SetXY((SCREEN_WIDTH / 2) - (btnOptions.GetWidth() / 2), 200);
|
btnOptions.SetXY(SCREEN_WIDTH / 2 - btnOptions.GetWidth() / 2, 200);
|
||||||
|
|
||||||
btnExitToMenu.SetOutRGB(200, 200, 200);
|
btnExitToMenu.SetOutRGB(200, 200, 200);
|
||||||
btnExitToMenu.SetOverRGB(255, 255, 255);
|
btnExitToMenu.SetOverRGB(255, 255, 255);
|
||||||
btnExitToMenu.SetTextRGB(0, 0, 0);
|
btnExitToMenu.SetTextRGB(0, 0, 0);
|
||||||
btnExitToMenu.SetText("Exit To Main Menu");
|
btnExitToMenu.SetText("Exit To Main Menu");
|
||||||
btnExitToMenu.SetXY((SCREEN_WIDTH / 2) - (btnExitToMenu.GetWidth() / 2), 250);
|
btnExitToMenu.SetXY(SCREEN_WIDTH / 2 - btnExitToMenu.GetWidth() / 2, 250);
|
||||||
}
|
}
|
||||||
|
|
||||||
IngameMenu::~IngameMenu(void) {
|
IngameMenu::~IngameMenu(void) {
|
||||||
|
@ -21,9 +21,10 @@ public:
|
|||||||
~MainMenu(void);
|
~MainMenu(void);
|
||||||
|
|
||||||
mainMenuNavVal_t Run(void);
|
mainMenuNavVal_t Run(void);
|
||||||
void Render(void);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void Render(void);
|
||||||
|
|
||||||
Map _background;
|
Map _background;
|
||||||
|
|
||||||
Text lblMenu;
|
Text lblMenu;
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
/*
|
||||||
|
* Version of MapElement, that will check whether the SDL_Surface it
|
||||||
|
* owns is NULL or not and draws.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _MAPENTITIES_H_
|
#ifndef _MAPENTITIES_H_
|
||||||
#define _MAPENTITIES_H_
|
#define _MAPENTITIES_H_
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ public:
|
|||||||
int GetX(void) { return x; }
|
int GetX(void) { return x; }
|
||||||
int GetY(void) { return y; }
|
int GetY(void) { return y; }
|
||||||
|
|
||||||
string GetText(void) { return _textContents; }
|
|
||||||
SDL_Color GetColour(void) { return _textColour; }
|
SDL_Color GetColour(void) { return _textColour; }
|
||||||
|
|
||||||
void SetXY(int xArg, int yArg);
|
void SetXY(int xArg, int yArg);
|
||||||
@ -35,6 +34,8 @@ public:
|
|||||||
int SetTextShaded(string textArg, textSizes_t size, SDL_Color, SDL_Color);
|
int SetTextShaded(string textArg, textSizes_t size, SDL_Color, SDL_Color);
|
||||||
int SetTextShaded(string textArg, textSizes_t size, Uint8 rF, Uint8 gF, Uint8 bF, Uint8 rB, Uint8 gB, Uint8 bB);
|
int SetTextShaded(string textArg, textSizes_t size, Uint8 rF, Uint8 gF, Uint8 bF, Uint8 rB, Uint8 gB, Uint8 bB);
|
||||||
|
|
||||||
|
string GetText(void) { return _textContents; }
|
||||||
|
|
||||||
void Render(void);
|
void Render(void);
|
||||||
void Render(int xArg, int yArg);
|
void Render(int xArg, int yArg);
|
||||||
void RenderLiteral(void);
|
void RenderLiteral(void);
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* The Texture Manager will keep a small "Database"
|
||||||
|
* of the name of the texture that is loaded and the
|
||||||
|
* actual texture so we can query it with the filename
|
||||||
|
* and it will return the teture if it is already in memory
|
||||||
|
* or load the tture if it is not.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _TEXTUREMANAGER_H_
|
#ifndef _TEXTUREMANAGER_H_
|
||||||
#define _TEXTUREMANAGER_H_
|
#define _TEXTUREMANAGER_H_
|
||||||
#include <SDL/SDL.h>
|
#include <SDL/SDL.h>
|
||||||
@ -6,13 +14,6 @@
|
|||||||
#include "ImageLoader.h"
|
#include "ImageLoader.h"
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
/*
|
|
||||||
* The Texture Manager will keep a small "Database"
|
|
||||||
* of the name of the texture that is loaded and the
|
|
||||||
* actual texture so we can query it with the filename
|
|
||||||
* and it will return the teture if it is already in memory
|
|
||||||
* or load the tture if it is not.
|
|
||||||
*/
|
|
||||||
class TextureManager {
|
class TextureManager {
|
||||||
public:
|
public:
|
||||||
TextureManager(void);
|
TextureManager(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user