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"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <allegro.h>
|
|
||||||
#include <allegro/internal/aintern.h>
|
|
||||||
|
|
||||||
#include "gfx/point.h"
|
#include "gfx/point.h"
|
||||||
#include "gfx/size.h"
|
#include "gfx/size.h"
|
||||||
#include "she/font.h"
|
#include "she/font.h"
|
||||||
@ -146,7 +143,7 @@ void drawTextBox(Graphics* g, Widget* widget,
|
|||||||
|
|
||||||
// Without word-wrap
|
// Without word-wrap
|
||||||
if (!(widget->getAlign() & JI_WORDWRAP)) {
|
if (!(widget->getAlign() & JI_WORDWRAP)) {
|
||||||
end = ustrchr(beg, '\n');
|
end = strchr(beg, '\n');
|
||||||
if (end) {
|
if (end) {
|
||||||
chr = *end;
|
chr = *end;
|
||||||
*end = 0;
|
*end = 0;
|
||||||
@ -156,7 +153,7 @@ void drawTextBox(Graphics* g, Widget* widget,
|
|||||||
else {
|
else {
|
||||||
old_end = NULL;
|
old_end = NULL;
|
||||||
for (beg_end=beg;;) {
|
for (beg_end=beg;;) {
|
||||||
end = ustrpbrk(beg_end, " \n");
|
end = strpbrk(beg_end, " \n");
|
||||||
if (end) {
|
if (end) {
|
||||||
chr = *end;
|
chr = *end;
|
||||||
*end = 0;
|
*end = 0;
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "ui/intern.h"
|
#include "ui/intern.h"
|
||||||
#include "ui/ui.h"
|
#include "ui/ui.h"
|
||||||
|
|
||||||
#include <allegro.h>
|
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
@ -139,21 +138,20 @@ void Widget::setText(const std::string& text)
|
|||||||
|
|
||||||
void Widget::setTextf(const char *format, ...)
|
void Widget::setTextf(const char *format, ...)
|
||||||
{
|
{
|
||||||
char buf[4096];
|
|
||||||
|
|
||||||
// formatted string
|
// formatted string
|
||||||
if (format) {
|
if (format) {
|
||||||
va_list ap;
|
va_list ap;
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
|
char buf[4096];
|
||||||
vsprintf(buf, format, ap);
|
vsprintf(buf, format, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
|
setText(buf);
|
||||||
}
|
}
|
||||||
// empty string
|
// empty string
|
||||||
else {
|
else {
|
||||||
ustrcpy(buf, empty_string);
|
setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
setText(buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::setTextQuiet(const std::string& text)
|
void Widget::setTextQuiet(const std::string& text)
|
||||||
|
Loading…
Reference in New Issue
Block a user