diff --git a/credits.txt b/credits.txt index bd360a946..7f1fd4990 100644 --- a/credits.txt +++ b/credits.txt @@ -16,3 +16,6 @@ And a big thanks to everyone else in the ClassiCube community (who I didn't ment who in the past have provided many suggestions and assisted in identifying bugs. * Portions of the FreeType project (https://www.freetype.org/) are used for text rendering + Some functionality has been removed compared to original FreeType source code. + Additionally, the base .c files have an #ifdef to disable compiling for emscripten + The source code of FreeType is otherwise unmodified. diff --git a/src/Chat.c b/src/Chat.c index 8c19439c3..34bd9192e 100644 --- a/src/Chat.c +++ b/src/Chat.c @@ -609,9 +609,11 @@ static void OnInit(void) { Commands_Register(&TeleportCommand); Commands_Register(&ClearDeniedCommand); -#if defined CC_BUILD_MINFILES || defined CC_BUILD_ANDROID +#if defined CC_BUILD_MINFILES +#elif defined CC_BUILD_ANDROID /* Better to not log chat by default on android, */ /* since it's not easily visible to end users */ + Chat_Logging = Options_GetBool(OPT_CHAT_LOGGING, false); #else Chat_Logging = Options_GetBool(OPT_CHAT_LOGGING, true); #endif diff --git a/src/Screens.c b/src/Screens.c index e93b33a7f..1817aae68 100644 --- a/src/Screens.c +++ b/src/Screens.c @@ -719,7 +719,7 @@ static struct ChatScreen { Screen_Body float chatAcc; cc_bool suppressNextPress; - int chatIndex; + int chatIndex, paddingX, paddingY; int lastDownloadStatus; struct FontDesc chatFont, announcementFont; struct TextWidget announcement; @@ -939,7 +939,8 @@ static void ChatScreen_DrawChatBackground(struct ChatScreen* s) { if (height > 0) { PackedCol backCol = PackedCol_Make(0, 0, 0, 127); - Gfx_Draw2DFlat(x - 5, y - 5, width + 10, height + 10, backCol); + Gfx_Draw2DFlat( x - s->paddingX, y - s->paddingY, + width + s->paddingX * 2, height + s->paddingY * 2, backCol); } } @@ -1033,6 +1034,9 @@ static void ChatScreen_Layout(void* screen) { int yOffset = Gui_HUD->hotbar.height + 15; /* TODO: This should be DPI scaled?? */ if (ChatScreen_ChatUpdateFont(s)) ChatScreen_Redraw(s); + s->paddingX = Display_ScaleX(5); + s->paddingY = Display_ScaleY(5); + Widget_SetLocation(&s->input.base, ANCHOR_MIN, ANCHOR_MAX, 5, 5); Widget_SetLocation(&s->altText, ANCHOR_MIN, ANCHOR_MAX, 5, 5); Widget_SetLocation(&s->status, ANCHOR_MAX, ANCHOR_MIN, 0, 0);