lobby_menu.cpp builds, as does all of client/menu_scenes
This is great progress, but I think I should turn the common directory into a subnmodule, since
I've been constantly tabbing back and forward between this folder, and the debug folder, making
and committing identical edits to both.
Scene list:
> disconnected_screen.*pp
> lobby_menu.*pp
> main_menu.*pp
> options_menu.*pp
> splash_screen.*pp
* world*.*pp
* unfinished
> building
This commit is contained in:
@@ -95,7 +95,7 @@ SDL_Texture* Image::Load(SDL_Renderer* renderer, std::string fname) {
|
||||
return texture;
|
||||
}
|
||||
|
||||
SDL_Texture* Image::Create(SDL_Renderer* renderer, Uint16 w, Uint16 h) {
|
||||
SDL_Texture* Image::Create(SDL_Renderer* renderer, Uint16 w, Uint16 h, SDL_Color blank) {
|
||||
Free();
|
||||
|
||||
//make the texture
|
||||
@@ -124,8 +124,9 @@ SDL_Texture* Image::Create(SDL_Renderer* renderer, Uint16 w, Uint16 h) {
|
||||
|
||||
//blank (black) texture
|
||||
SDL_SetRenderTarget(renderer, texture);
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0);
|
||||
SDL_SetRenderDrawColor(renderer, blank.r, blank.g, blank.b, blank.a);
|
||||
SDL_RenderFillRect(renderer, nullptr);
|
||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 0);
|
||||
SDL_SetRenderTarget(renderer, nullptr);
|
||||
|
||||
return texture;
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
Image& operator=(Image&&);
|
||||
|
||||
SDL_Texture* Load(SDL_Renderer* renderer, std::string fname);
|
||||
SDL_Texture* Create(SDL_Renderer* renderer, Uint16 w, Uint16 h);
|
||||
SDL_Texture* Create(SDL_Renderer* renderer, Uint16 w, Uint16 h, SDL_Color blank = {0, 0, 0, 255});
|
||||
SDL_Texture* CopyTexture(SDL_Renderer* renderer, SDL_Texture* ptr);
|
||||
SDL_Texture* SetTexture(SDL_Texture*);
|
||||
SDL_Texture* GetTexture() const;
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
TextLine();
|
||||
TextLine(SDL_Renderer* r, TTF_Font* f, std::string s, SDL_Color c)
|
||||
{ SetText(r, f, s, c); }
|
||||
~TextLine();
|
||||
virtual ~TextLine();
|
||||
|
||||
void DrawTo(SDL_Renderer*, int posX, int posY);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user