mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-04 05:50:15 +00:00
Remove some references to <allegro.h>
This commit is contained in:
parent
b37ec489f6
commit
901b2acc06
@ -8,9 +8,6 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <allegro.h>
|
||||
#include <allegro/internal/aintern.h>
|
||||
|
||||
#include "gfx/point.h"
|
||||
#include "gfx/size.h"
|
||||
#include "she/font.h"
|
||||
@ -146,7 +143,7 @@ void drawTextBox(Graphics* g, Widget* widget,
|
||||
|
||||
// Without word-wrap
|
||||
if (!(widget->getAlign() & JI_WORDWRAP)) {
|
||||
end = ustrchr(beg, '\n');
|
||||
end = strchr(beg, '\n');
|
||||
if (end) {
|
||||
chr = *end;
|
||||
*end = 0;
|
||||
@ -156,7 +153,7 @@ void drawTextBox(Graphics* g, Widget* widget,
|
||||
else {
|
||||
old_end = NULL;
|
||||
for (beg_end=beg;;) {
|
||||
end = ustrpbrk(beg_end, " \n");
|
||||
end = strpbrk(beg_end, " \n");
|
||||
if (end) {
|
||||
chr = *end;
|
||||
*end = 0;
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "ui/intern.h"
|
||||
#include "ui/ui.h"
|
||||
|
||||
#include <allegro.h>
|
||||
#include <cctype>
|
||||
#include <climits>
|
||||
#include <cstdarg>
|
||||
@ -139,21 +138,20 @@ void Widget::setText(const std::string& text)
|
||||
|
||||
void Widget::setTextf(const char *format, ...)
|
||||
{
|
||||
char buf[4096];
|
||||
|
||||
// formatted string
|
||||
if (format) {
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
char buf[4096];
|
||||
vsprintf(buf, format, ap);
|
||||
va_end(ap);
|
||||
|
||||
setText(buf);
|
||||
}
|
||||
// empty string
|
||||
else {
|
||||
ustrcpy(buf, empty_string);
|
||||
setText("");
|
||||
}
|
||||
|
||||
setText(buf);
|
||||
}
|
||||
|
||||
void Widget::setTextQuiet(const std::string& text)
|
||||
|
Loading…
Reference in New Issue
Block a user