Advertisement
Combreal

TextSprite.h

Apr 18th, 2019
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.12 KB | None | 0 0
  1. #pragma once
  2. #include "stdafx.h"
  3. #include "SDL_Setup.h"
  4.  
  5. class CTextSprite
  6. {
  7. public:
  8.     CTextSprite(CSDL_Setup* passed_SDL_Setup, SDL_Renderer* passed_renderer, std::string passed_FilePath, std::string passed_Sentence, int passed_PoliceSize, Uint8 passed_r, Uint8 passed_g, Uint8 passed_b, Uint8 passed_a, int x, int y, int w, int h);
  9.     ~CTextSprite(void);
  10.     bool loadFromRenderedText(std::string textureText);
  11.     void DrawText();
  12.     void SetX(int X);
  13.     void SetY(int Y);
  14.     void SetPosition(int X, int Y);
  15.     bool SetFontSize(int fontSize);
  16.     bool SetFontColor(Uint8 passed_r, Uint8 passed_g, Uint8 passed_b, Uint8 passed_a);
  17.     void SetWidth(int W);
  18.     void SetHeight(int H);
  19.     int GetX();
  20.     int GetY();
  21.     int GetWidth();
  22.     int GetHeight();
  23.     int GetFontSize();
  24. private:
  25.     CSDL_Setup* csdl_setup;
  26.     SDL_Renderer* renderer;
  27.     SDL_Surface* text;
  28.     SDL_Surface* textSurface;
  29.     SDL_Texture* Message;
  30.     SDL_Color textColor;
  31.     std::string filePath;
  32.     std::string sentence;
  33.     std::string filePatha;
  34.     TTF_Font *font;
  35.     SDL_Rect position;
  36.     bool renderText;
  37.     int policeSize;
  38.     int X_pos;
  39.     int Y_pos;
  40.     Uint8 r;
  41.     Uint8 g;
  42.     Uint8 b;
  43.     Uint8 a;
  44. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement