mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 18:04:09 +03:00
Move wordwrapping functions and len to Font.cpp/font:: namespace
The following functions were moved directly: - next_wrap - next_wrap_s - string_wordwrap - string_wordwrap_balanced - string_unwordwrap These ones will probably still need get a flags argument, except for string_unwordwrap (since they need to know what font we're talking about. The implementation of graphics.len has also been moved to Font.cpp, but graphics.len still exists for now and is deprecated.
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
1d8494db8d
commit
159c70dade
@@ -6,6 +6,7 @@
|
||||
#include "Constants.h"
|
||||
#include "CustomLevels.h"
|
||||
#include "FileSystemUtils.h"
|
||||
#include "Font.h"
|
||||
#include "Graphics.h"
|
||||
#include "Unused.h"
|
||||
#include "UtilityClass.h"
|
||||
@@ -309,7 +310,7 @@ static bool max_check_string(const char* str, const char* max)
|
||||
else
|
||||
{
|
||||
short lines;
|
||||
graphics.string_wordwrap(str, max_w_px, &lines);
|
||||
font::string_wordwrap(str, max_w_px, &lines);
|
||||
does_overflow = lines > (short) max_h;
|
||||
}
|
||||
|
||||
@@ -651,7 +652,7 @@ static void loadtext_cutscenes(bool custom_level)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
const std::string eng_unwrapped = graphics.string_unwordwrap(eng);
|
||||
const std::string eng_unwrapped = font::string_unwordwrap(eng);
|
||||
char* eng_prefixed = add_disambiguator(subElem->UnsignedAttribute("case", 1), eng_unwrapped.c_str(), NULL);
|
||||
if (eng_prefixed == NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user