You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
498 B
38 lines
498 B
#pragma once |
|
|
|
#include <SDL.h> |
|
#include <SDL_ttf.h> |
|
|
|
#include "types.h" |
|
|
|
|
|
struct sdl_context { |
|
SDL_Renderer* ren; |
|
SDL_Window* win; |
|
int height; |
|
int width; |
|
}; |
|
|
|
|
|
struct fontpack { |
|
TTF_Font* usernames; |
|
TTF_Font* messages; |
|
}; |
|
|
|
struct colourpack { |
|
SDL_Color background; |
|
SDL_Color messages; |
|
}; |
|
|
|
|
|
struct drawinfo { |
|
struct sdl_context drawcontext; |
|
struct fontpack fonts; |
|
struct colourpack colours; |
|
int sock; |
|
unsigned int max_age; |
|
}; |
|
|
|
|
|
void draw(struct drawinfo d, std::deque<msg> &messages); |
|
|
|
|