mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 09:39:43 +01:00
Remove textboxwrap() and wrap() return value
This removes Graphics::textboxwrap(), as it is now an unused function. Additionally, this removes the return value of textboxclass::wrap(), as it is also now unused.
This commit is contained in:
parent
c50da88ad4
commit
505956ae83
4 changed files with 3 additions and 19 deletions
|
@ -3238,18 +3238,6 @@ void Graphics::textboxcentery(void)
|
||||||
textboxes[m].should_centery = true;
|
textboxes[m].should_centery = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Graphics::textboxwrap(int pad)
|
|
||||||
{
|
|
||||||
// TODO: delete this function?
|
|
||||||
if (!INBOUNDS_VEC(m, textboxes))
|
|
||||||
{
|
|
||||||
vlog_error("textboxwrap() out-of-bounds!");
|
|
||||||
return 16;
|
|
||||||
}
|
|
||||||
|
|
||||||
return textboxes[m].wrap(pad);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Graphics::textboxpad(size_t left_pad, size_t right_pad)
|
void Graphics::textboxpad(size_t left_pad, size_t right_pad)
|
||||||
{
|
{
|
||||||
if (!INBOUNDS_VEC(m, textboxes))
|
if (!INBOUNDS_VEC(m, textboxes))
|
||||||
|
|
|
@ -102,8 +102,6 @@ public:
|
||||||
|
|
||||||
void textboxcentery(void);
|
void textboxcentery(void);
|
||||||
|
|
||||||
int textboxwrap(int pad);
|
|
||||||
|
|
||||||
void textboxpad(size_t left_pad, size_t right_pad);
|
void textboxpad(size_t left_pad, size_t right_pad);
|
||||||
|
|
||||||
void textboxpadtowidth(size_t new_w);
|
void textboxpadtowidth(size_t new_w);
|
||||||
|
|
|
@ -274,7 +274,7 @@ void textboxclass::centertext(void)
|
||||||
padtowidth(w-16);
|
padtowidth(w-16);
|
||||||
}
|
}
|
||||||
|
|
||||||
int textboxclass::wrap(int pad)
|
void textboxclass::wrap(int pad)
|
||||||
{
|
{
|
||||||
/* This function just takes a single-line textbox and wraps it...
|
/* This function just takes a single-line textbox and wraps it...
|
||||||
* pad = the total number of characters we are going to pad this textbox.
|
* pad = the total number of characters we are going to pad this textbox.
|
||||||
|
@ -285,7 +285,7 @@ int textboxclass::wrap(int pad)
|
||||||
if (lines.empty())
|
if (lines.empty())
|
||||||
{
|
{
|
||||||
vlog_error("textboxclass::wrap() has no first line!");
|
vlog_error("textboxclass::wrap() has no first line!");
|
||||||
return 16;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string wrapped = font::string_wordwrap_balanced(
|
std::string wrapped = font::string_wordwrap_balanced(
|
||||||
|
@ -304,8 +304,6 @@ int textboxclass::wrap(int pad)
|
||||||
addline(wrapped.substr(startline, newline-startline));
|
addline(wrapped.substr(startline, newline-startline));
|
||||||
startline = newline + 1;
|
startline = newline + 1;
|
||||||
} while (newline != std::string::npos);
|
} while (newline != std::string::npos);
|
||||||
|
|
||||||
return h;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void textboxclass::copyoriginaltext(void)
|
void textboxclass::copyoriginaltext(void)
|
||||||
|
|
|
@ -97,7 +97,7 @@ public:
|
||||||
|
|
||||||
void centertext(void);
|
void centertext(void);
|
||||||
|
|
||||||
int wrap(int pad);
|
void wrap(int pad);
|
||||||
|
|
||||||
void copyoriginaltext(void);
|
void copyoriginaltext(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue