mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 09:54:10 +03:00
De-duplicate text printing functions
I've made a new function, Graphics::do_print(), that does the actual text printing itself. All the interfaces of the other functions have been left alone, but now just call do_print() instead. I also removed PrintOffAlpha() and just calculated the center x-position in bprintalpha() itself (like bigbprint() does) to make it easier to de-duplicate code.
This commit is contained in:
@@ -131,6 +131,8 @@ public:
|
||||
|
||||
void map_option(int opt, int num_opts, const std::string& text, bool selected = false);
|
||||
|
||||
void do_print(int x, int y, const std::string& text, int r, int g, int b, int a, int scale);
|
||||
|
||||
void Print(int _x, int _y, std::string _s, int r, int g, int b, bool cen = false);
|
||||
|
||||
void PrintAlpha(int _x, int _y, std::string _s, int r, int g, int b, int a, bool cen = false);
|
||||
@@ -141,8 +143,6 @@ public:
|
||||
|
||||
void PrintWrap(int x, int y, const char* str, int r, int g, int b, bool cen, int linespacing, int maxwidth);
|
||||
|
||||
void PrintOffAlpha(int _x, int _y, std::string _s, int r, int g, int b, int a, bool cen = false);
|
||||
|
||||
void bprint(int x, int y, std::string t, int r, int g, int b, bool cen = false);
|
||||
|
||||
void bprintalpha(int x, int y, std::string t, int r, int g, int b, int a, bool cen = false);
|
||||
|
||||
Reference in New Issue
Block a user