-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetinput.hpp
More file actions
42 lines (31 loc) · 873 Bytes
/
Copy pathgetinput.hpp
File metadata and controls
42 lines (31 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <SDL.h>
#include <SDL_image.h>
#include <SDL_ttf.h>
#include <stdio.h>
#include <string>
#include <sstream>
#ifndef __getinput_h__
#define __getinput_h__
class LTexture
{
public:
LTexture();
~LTexture();
bool loadFromFile( std::string path );
#ifdef _SDL_TTF_H
bool loadFromRenderedText( std::string textureText, SDL_Color textColor );
#endif
void free();
void setColor( Uint8 red, Uint8 green, Uint8 blue );
void setBlendMode( SDL_BlendMode blending );
void setAlpha( Uint8 alpha );
void render( int x, int y, SDL_Rect* clip = NULL, double angle = 0.0, SDL_Point* center = NULL, SDL_RendererFlip flip = SDL_FLIP_NONE );
void renderTexture(int x, int y, int w, int h);
int getWidth();
int getHeight();
private:
SDL_Texture* mTexture;
int mWidth;
int mHeight;
};
#endif