From cd5f316383fc4f044b574d75fb518d3ebdbb39db Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 12 Mar 2022 20:50:38 +1100 Subject: [PATCH] Launcher: Fix clicking on checkboxes over and over not properly resetting previously drawn text, which resulted in some ugly artifacts --- android/app/CMakeLists.txt | 1 - src/LBackend.c | 2 +- src/LScreens.c | 174 ++++++++++++++++++------------------- src/LWidgets.c | 38 ++------ src/LWidgets.h | 21 ++--- 5 files changed, 102 insertions(+), 134 deletions(-) diff --git a/android/app/CMakeLists.txt b/android/app/CMakeLists.txt index 98572d1bf..d21274b1e 100644 --- a/android/app/CMakeLists.txt +++ b/android/app/CMakeLists.txt @@ -98,7 +98,6 @@ add_library(classicube SHARED ../../src/EnvRenderer.c ../../src/Animations.c ../../src/LBackend.c - ../../src/TouchUI.c ) # add lib dependencies diff --git a/src/LBackend.c b/src/LBackend.c index aa05a630e..fe66518f9 100644 --- a/src/LBackend.c +++ b/src/LBackend.c @@ -365,7 +365,7 @@ void LBackend_DrawSlider(struct LSlider* w) { LSlider_DrawBox(w); curWidth = (int)((w->width - xBorder2) * w->value / w->maxValue); - Drawer2D_Clear(&Launcher_Framebuffer, w->col, + Drawer2D_Clear(&Launcher_Framebuffer, w->color, w->x + xBorder, w->y + yBorder, curWidth, w->height - yBorder2); } diff --git a/src/LScreens.c b/src/LScreens.c index ef14884bd..2b67c2cdc 100644 --- a/src/LScreens.c +++ b/src/LScreens.c @@ -274,23 +274,23 @@ static void ChooseModeScreen_Init(struct LScreen* s_) { s->widgets = chooseMode_widgets; s->numWidgets = Array_Elems(chooseMode_widgets); - LLine_Init2( &s->seps[0], 490); - LLine_Init2( &s->seps[1], 490); + LLine_Init( &s->seps[0], 490); + LLine_Init( &s->seps[1], 490); - LButton_Init2(&s->btnEnhanced, 145, 35, "Enhanced"); - LLabel_Init2( &s->lblEnhanced[0], "&eEnables custom blocks, changing env"); - LLabel_Init2( &s->lblEnhanced[1], "&esettings, longer messages, and more"); + LButton_Init(&s->btnEnhanced, 145, 35, "Enhanced"); + LLabel_Init( &s->lblEnhanced[0], "&eEnables custom blocks, changing env"); + LLabel_Init( &s->lblEnhanced[1], "&esettings, longer messages, and more"); - LButton_Init2(&s->btnClassicHax, 145, 35, "Classic +hax"); - LLabel_Init2( &s->lblClassicHax[0], "&eSame as Classic mode, except that"); - LLabel_Init2( &s->lblClassicHax[1], "&ehacks (noclip/fly/speed) are enabled"); + LButton_Init(&s->btnClassicHax, 145, 35, "Classic +hax"); + LLabel_Init( &s->lblClassicHax[0], "&eSame as Classic mode, except that"); + LLabel_Init( &s->lblClassicHax[1], "&ehacks (noclip/fly/speed) are enabled"); - LButton_Init2(&s->btnClassic, 145, 35, "Classic"); - LLabel_Init2( &s->lblClassic[0], "&eOnly uses blocks and features from"); - LLabel_Init2( &s->lblClassic[1], "ðe original minecraft classic"); + LButton_Init(&s->btnClassic, 145, 35, "Classic"); + LLabel_Init( &s->lblClassic[0], "&eOnly uses blocks and features from"); + LLabel_Init( &s->lblClassic[1], "ðe original minecraft classic"); - LLabel_Init2( &s->lblHelp, "&eClick &fEnhanced &eif you're not sure which mode to choose."); - LButton_Init2(&s->btnBack, 80, 35, "Back"); + LLabel_Init( &s->lblHelp, "&eClick &fEnhanced &eif you're not sure which mode to choose."); + LButton_Init(&s->btnBack, 80, 35, "Back"); s->btnEnhanced.OnClick = UseModeEnhanced; s->btnClassicHax.OnClick = UseModeClassicHax; @@ -475,24 +475,24 @@ static void ColoursScreen_Init(struct LScreen* s_) { s->numWidgets = Array_Elems(colours_widgets); for (i = 0; i < 5 * 3; i++) { - LInput_Init2(&s->iptColours[i], 55, NULL); + LInput_Init(&s->iptColours[i], 55, NULL); s->iptColours[i].type = KEYBOARD_TYPE_INTEGER; s->iptColours[i].TextFilter = ColoursScreen_InputFilter; s->iptColours[i].TextChanged = ColoursScreen_TextChanged; } - LLabel_Init2( &s->lblNames[0], "Background"); - LLabel_Init2( &s->lblNames[1], "Button border"); - LLabel_Init2( &s->lblNames[2], "Button highlight"); - LLabel_Init2( &s->lblNames[3], "Button"); - LLabel_Init2( &s->lblNames[4], "Active button"); + LLabel_Init( &s->lblNames[0], "Background"); + LLabel_Init( &s->lblNames[1], "Button border"); + LLabel_Init( &s->lblNames[2], "Button highlight"); + LLabel_Init( &s->lblNames[3], "Button"); + LLabel_Init( &s->lblNames[4], "Active button"); - LLabel_Init2( &s->lblRGB[0], "Red"); - LLabel_Init2( &s->lblRGB[1], "Green"); - LLabel_Init2( &s->lblRGB[2], "Blue"); - LButton_Init2(&s->btnBack, 80, 35, "Back"); + LLabel_Init( &s->lblRGB[0], "Red"); + LLabel_Init( &s->lblRGB[1], "Green"); + LLabel_Init( &s->lblRGB[2], "Blue"); + LButton_Init(&s->btnBack, 80, 35, "Back"); - LCheckbox_Init2(&s->cbClassic, "Classic style"); + LCheckbox_Init(&s->cbClassic, "Classic style"); s->cbClassic.OnClick = ColoursScreen_ToggleBG; s->btnBack.OnClick = SwitchToThemes; } @@ -650,13 +650,13 @@ static void DirectConnectScreen_Init(struct LScreen* s_) { s->widgets = directConnect_widgets; s->numWidgets = Array_Elems(directConnect_widgets); - LInput_Init2(&s->iptUsername, 330, "&gUsername.."); - LInput_Init2(&s->iptAddress, 330, "&gIP address:Port number.."); - LInput_Init2(&s->iptMppass, 330, "&gMppass.."); + LInput_Init(&s->iptUsername, 330, "&gUsername.."); + LInput_Init(&s->iptAddress, 330, "&gIP address:Port number.."); + LInput_Init(&s->iptMppass, 330, "&gMppass.."); - LButton_Init2(&s->btnConnect, 110, 35, "Connect"); - LButton_Init2(&s->btnBack, 80, 35, "Back"); - LLabel_Init2( &s->lblStatus, ""); + LButton_Init(&s->btnConnect, 110, 35, "Connect"); + LButton_Init(&s->btnBack, 80, 35, "Back"); + LLabel_Init( &s->lblStatus, ""); s->iptUsername.ClipboardFilter = DirectConnectScreen_UrlFilter; s->iptAddress.ClipboardFilter = DirectConnectScreen_UrlFilter; @@ -722,10 +722,10 @@ static void MFAScreen_Init(struct LScreen* s_) { s->widgets = mfa_widgets; s->numWidgets = Array_Elems(mfa_widgets); - LLabel_Init2( &s->lblTitle, ""); - LInput_Init2( &s->iptCode, 280, "&gLogin code.."); - LButton_Init2(&s->btnSignIn, 100, 35, "Sign in"); - LButton_Init2(&s->btnCancel, 100, 35, "Cancel"); + LLabel_Init( &s->lblTitle, ""); + LInput_Init( &s->iptCode, 280, "&gLogin code.."); + LButton_Init(&s->btnSignIn, 100, 35, "Sign in"); + LButton_Init(&s->btnCancel, 100, 35, "Cancel"); s->btnSignIn.OnClick = MFAScreen_SignIn; s->btnCancel.OnClick = MFAScreen_Cancel; @@ -873,18 +873,18 @@ static void MainScreen_Init(struct LScreen* s_) { s->widgets = main_widgets; s->numWidgets = Array_Elems(main_widgets); - LInput_Init2( &s->iptUsername, 280, "&gUsername.."); - LInput_Init2( &s->iptPassword, 280, "&gPassword.."); - LButton_Init2(&s->btnLogin, 100, 35, "Sign in"); - LButton_Init2(&s->btnResume, 100, 35, "Resume"); + LInput_Init( &s->iptUsername, 280, "&gUsername.."); + LInput_Init( &s->iptPassword, 280, "&gPassword.."); + LButton_Init(&s->btnLogin, 100, 35, "Sign in"); + LButton_Init(&s->btnResume, 100, 35, "Resume"); - LLabel_Init2( &s->lblStatus, ""); - LButton_Init2(&s->btnDirect, 200, 35, "Direct connect"); - LButton_Init2(&s->btnSPlayer, 200, 35, "Singleplayer"); + LLabel_Init( &s->lblStatus, ""); + LButton_Init(&s->btnDirect, 200, 35, "Direct connect"); + LButton_Init(&s->btnSPlayer, 200, 35, "Singleplayer"); - LLabel_Init2( &s->lblUpdate, ""); - LButton_Init2(&s->btnRegister, 100, 35, "Register"); - LButton_Init2(&s->btnOptions, 100, 35, "Options"); + LLabel_Init( &s->lblUpdate, ""); + LButton_Init(&s->btnRegister, 100, 35, "Register"); + LButton_Init(&s->btnOptions, 100, 35, "Options"); s->btnLogin.OnClick = MainScreen_Login; s->btnResume.OnClick = MainScreen_Resume; @@ -1121,12 +1121,12 @@ static void CheckResourcesScreen_Init(struct LScreen* s_) { s->widgets = checkResources_widgets; s->numWidgets = Array_Elems(checkResources_widgets); - LLabel_Init2( &s->lblLine1, "Some required resources weren't found"); - LLabel_Init2( &s->lblLine2, "Okay to download?"); - LLabel_Init2( &s->lblStatus, ""); + LLabel_Init( &s->lblLine1, "Some required resources weren't found"); + LLabel_Init( &s->lblLine2, "Okay to download?"); + LLabel_Init( &s->lblStatus, ""); - LButton_Init2(&s->btnYes, 70, 35, "Yes"); - LButton_Init2(&s->btnNo, 70, 35, "No"); + LButton_Init(&s->btnYes, 70, 35, "Yes"); + LButton_Init(&s->btnNo, 70, 35, "No"); s->btnYes.OnClick = CheckResourcesScreen_Yes; s->btnNo.OnClick = CheckResourcesScreen_Next; } @@ -1204,9 +1204,9 @@ static void FetchResourcesScreen_Init(struct LScreen* s_) { s->widgets = fetchResources_widgets; s->numWidgets = Array_Elems(fetchResources_widgets); - LLabel_Init2( &s->lblStatus, ""); - LButton_Init2(&s->btnCancel, 120, 35, "Cancel"); - LSlider_Init2(&s->sdrProgress, 200, 12, BitmapCol_Make(0, 220, 0, 255)); + LLabel_Init( &s->lblStatus, ""); + LButton_Init(&s->btnCancel, 120, 35, "Cancel"); + LSlider_Init(&s->sdrProgress, 200, 12, BitmapCol_Make(0, 220, 0, 255)); s->lblStatus.font = &Launcher_HintFont; s->btnCancel.OnClick = CheckResourcesScreen_Next; @@ -1375,12 +1375,12 @@ static void ServersScreen_Init(struct LScreen* s_) { s->widgets = servers_widgets; s->numWidgets = Array_Elems(servers_widgets); - LInput_Init2( &s->iptSearch, 370, "&gSearch servers.."); - LInput_Init2( &s->iptHash, 475, "&gclassicube.net/server/play/..."); + LInput_Init( &s->iptSearch, 370, "&gSearch servers.."); + LInput_Init( &s->iptHash, 475, "&gclassicube.net/server/play/..."); - LButton_Init2(&s->btnBack, 110, 30, "Back"); - LButton_Init2(&s->btnConnect, 130, 30, "Connect"); - LButton_Init2(&s->btnRefresh, 110, 30, "Refresh"); + LButton_Init(&s->btnBack, 110, 30, "Back"); + LButton_Init(&s->btnConnect, 130, 30, "Connect"); + LButton_Init(&s->btnRefresh, 110, 30, "Refresh"); s->btnBack.OnClick = SwitchToMain; s->btnConnect.OnClick = ServersScreen_Connect; @@ -1536,7 +1536,7 @@ static void SettingsScreen_AutoClose(void* w, int idx) { struct LCheckbox* cb = (struct LCheckbox*)w; cb->value = !cb->value; Options_SetBool(LOPT_AUTO_CLOSE, cb->value); - LWidget_Draw(cb); + LWidget_Redraw(cb); } #endif static void SettingsScreen_ShowEmpty(void* w, int idx) { @@ -1545,33 +1545,33 @@ static void SettingsScreen_ShowEmpty(void* w, int idx) { Launcher_ShowEmptyServers = cb->value; Options_SetBool(LOPT_SHOW_EMPTY, cb->value); - LWidget_Draw(cb); + LWidget_Redraw(cb); } static void SettingsScreen_Init(struct LScreen* s_) { struct SettingsScreen* s = (struct SettingsScreen*)s_; - LLine_Init2( &s->sep, 380); + LLine_Init( &s->sep, 380); - LButton_Init2(&s->btnUpdates, 110, 35, "Updates"); - LLabel_Init2( &s->lblUpdates, "&eGet the latest stuff"); + LButton_Init(&s->btnUpdates, 110, 35, "Updates"); + LLabel_Init( &s->lblUpdates, "&eGet the latest stuff"); - LButton_Init2(&s->btnMode, 110, 35, "Mode"); - LLabel_Init2( &s->lblMode, "&eChange the enabled features"); + LButton_Init(&s->btnMode, 110, 35, "Mode"); + LLabel_Init( &s->lblMode, "&eChange the enabled features"); - LButton_Init2(&s->btnColours, 110, 35, "Theme"); - LLabel_Init2( &s->lblColours, "&eChange how the launcher looks"); + LButton_Init(&s->btnColours, 110, 35, "Theme"); + LLabel_Init( &s->lblColours, "&eChange how the launcher looks"); #if defined CC_BUILD_MOBILE - LCheckbox_Init2(&s->cbExtra, "Force landscape"); + LCheckbox_Init(&s->cbExtra, "Force landscape"); s->cbExtra.OnClick = SettingsScreen_LockOrientation; #else - LCheckbox_Init2(&s->cbExtra, "Close this after game starts"); + LCheckbox_Init(&s->cbExtra, "Close this after game starts"); s->cbExtra.OnClick = SettingsScreen_AutoClose; #endif - LCheckbox_Init2(&s->cbEmpty, "Show empty servers in list"); + LCheckbox_Init(&s->cbEmpty, "Show empty servers in list"); s->cbEmpty.OnClick = SettingsScreen_ShowEmpty; - LButton_Init2( &s->btnBack, 80, 35, "Back"); + LButton_Init( &s->btnBack, 80, 35, "Back"); s->btnMode.OnClick = SwitchToChooseMode; s->btnUpdates.OnClick = SwitchToUpdates; @@ -1669,11 +1669,11 @@ static void ThemesScreen_Init(struct LScreen* s_) { s->widgets = themes_widgets; s->numWidgets = Array_Elems(themes_widgets); - LButton_Init2(&s->btnModern, 200, 35, "Modern"); - LButton_Init2(&s->btnClassic, 200, 35, "Classic"); - LButton_Init2(&s->btnNordic, 200, 35, "Nordic"); - LButton_Init2(&s->btnCustom, 200, 35, "Custom"); - LButton_Init2(&s->btnBack, 80, 35, "Back"); + LButton_Init(&s->btnModern, 200, 35, "Modern"); + LButton_Init(&s->btnClassic, 200, 35, "Classic"); + LButton_Init(&s->btnNordic, 200, 35, "Nordic"); + LButton_Init(&s->btnCustom, 200, 35, "Custom"); + LButton_Init(&s->btnBack, 80, 35, "Back"); s->btnModern.OnClick = ThemesScreen_Modern; s->btnClassic.OnClick = ThemesScreen_Classic; @@ -1868,24 +1868,24 @@ static void UpdatesScreen_Init(struct LScreen* s_) { if (Updater_Info.numBuilds < 2) s->numWidgets -= 2; if (Updater_Info.numBuilds < 1) s->numWidgets -= 2; - LLabel_Init2(&s->lblYour, "Your build: (unknown)"); - LLine_Init2( &s->seps[0], 320); - LLine_Init2( &s->seps[1], 320); + LLabel_Init(&s->lblYour, "Your build: (unknown)"); + LLine_Init( &s->seps[0], 320); + LLine_Init( &s->seps[1], 320); - LLabel_Init2( &s->lblRel, "Latest release: Checking.."); - LLabel_Init2( &s->lblDev, "Latest dev build: Checking.."); - LLabel_Init2( &s->lblStatus, ""); - LButton_Init2(&s->btnBack, 80, 35, "Back"); + LLabel_Init( &s->lblRel, "Latest release: Checking.."); + LLabel_Init( &s->lblDev, "Latest dev build: Checking.."); + LLabel_Init( &s->lblStatus, ""); + LButton_Init(&s->btnBack, 80, 35, "Back"); if (Updater_Info.numBuilds >= 1) { - LButton_Init2(&s->btnRel[0], 130, 35, Updater_Info.builds[0].name); - LButton_Init2(&s->btnDev[0], 130, 35, Updater_Info.builds[0].name); + LButton_Init(&s->btnRel[0], 130, 35, Updater_Info.builds[0].name); + LButton_Init(&s->btnDev[0], 130, 35, Updater_Info.builds[0].name); } if (Updater_Info.numBuilds >= 2) { - LButton_Init2(&s->btnRel[1], 130, 35, Updater_Info.builds[1].name); - LButton_Init2(&s->btnDev[1], 130, 35, Updater_Info.builds[1].name); + LButton_Init(&s->btnRel[1], 130, 35, Updater_Info.builds[1].name); + LButton_Init(&s->btnDev[1], 130, 35, Updater_Info.builds[1].name); } - LLabel_Init2(&s->lblInfo, Updater_Info.info); + LLabel_Init(&s->lblInfo, Updater_Info.info); s->btnRel[0].OnClick = UpdatesScreen_Rel_0; s->btnRel[1].OnClick = UpdatesScreen_Rel_1; diff --git a/src/LWidgets.c b/src/LWidgets.c index c96ff7ea7..29cfa925a 100644 --- a/src/LWidgets.c +++ b/src/LWidgets.c @@ -95,11 +95,7 @@ static const struct LWidgetVTABLE lbutton_VTABLE = { LButton_Hover, LWidget_Draw, /* Hover */ NULL, NULL /* Select */ }; -void LButton_Init(struct LScreen* s, struct LButton* w, int width, int height, const char* text) { - LButton_Init2(w, width, height, text); - s->widgets[s->numWidgets++] = (struct LWidget*)w; -} -void LButton_Init2(struct LButton* w, int width, int height, const char* text) { +void LButton_Init(struct LButton* w, int width, int height, const char* text) { w->VTABLE = &lbutton_VTABLE; w->tabSelectable = true; w->width = Display_ScaleX(width); @@ -132,11 +128,7 @@ static const struct LWidgetVTABLE lcheckbox_VTABLE = { NULL, NULL, /* Hover */ NULL, NULL /* Select */ }; -void LCheckbox_Init(struct LScreen* s, struct LCheckbox* w, const char* text) { - LCheckbox_Init2(w, text); - s->widgets[s->numWidgets++] = (struct LWidget*)w; -} -void LCheckbox_Init2(struct LCheckbox* w, const char* text) { +void LCheckbox_Init(struct LCheckbox* w, const char* text) { struct DrawTextArgs args; w->VTABLE = &lcheckbox_VTABLE; w->font = &Launcher_TextFont; @@ -411,11 +403,7 @@ static const struct LWidgetVTABLE linput_VTABLE = { LInput_Select, LInput_Unselect, /* Select */ NULL, LInput_TextChanged /* TextChanged */ }; -void LInput_Init(struct LScreen* s, struct LInput* w, int width, const char* hintText) { - LInput_Init2(w, width, hintText); - s->widgets[s->numWidgets++] = (struct LWidget*)w; -} -void LInput_Init2(struct LInput* w, int width, const char* hintText) { +void LInput_Init(struct LInput* w, int width, const char* hintText) { w->VTABLE = &linput_VTABLE; w->tabSelectable = true; w->TextFilter = LInput_DefaultInputFilter; @@ -484,11 +472,7 @@ static const struct LWidgetVTABLE llabel_VTABLE = { NULL, NULL, /* Hover */ NULL, NULL /* Select */ }; -void LLabel_Init(struct LScreen* s, struct LLabel* w, const char* text) { - LLabel_Init2(w, text); - s->widgets[s->numWidgets++] = (struct LWidget*)w; -} -void LLabel_Init2(struct LLabel* w, const char* text) { +void LLabel_Init(struct LLabel* w, const char* text) { w->VTABLE = &llabel_VTABLE; w->font = &Launcher_TextFont; @@ -526,11 +510,7 @@ static const struct LWidgetVTABLE lline_VTABLE = { NULL, NULL, /* Hover */ NULL, NULL /* Select */ }; -void LLine_Init(struct LScreen* s, struct LLine* w, int width) { - LLine_Init2(w, width); - s->widgets[s->numWidgets++] = (struct LWidget*)w; -} -void LLine_Init2(struct LLine* w, int width) { +void LLine_Init(struct LLine* w, int width) { w->VTABLE = &lline_VTABLE; w->width = Display_ScaleX(width); w->height = Display_ScaleY(2); @@ -551,16 +531,12 @@ static const struct LWidgetVTABLE lslider_VTABLE = { NULL, NULL, /* Hover */ NULL, NULL /* Select */ }; -void LSlider_Init(struct LScreen* s, struct LSlider* w, int width, int height, BitmapCol col) { - LSlider_Init2(w, width, height, col); - s->widgets[s->numWidgets++] = (struct LWidget*)w; -} -void LSlider_Init2(struct LSlider* w, int width, int height, BitmapCol col) { +void LSlider_Init(struct LSlider* w, int width, int height, BitmapCol color) { w->VTABLE = &lslider_VTABLE; w->width = Display_ScaleX(width); w->height = Display_ScaleY(height); w->maxValue = 100; - w->col = col; + w->color = color; } diff --git a/src/LWidgets.h b/src/LWidgets.h index d678424c4..8a5ef8a81 100644 --- a/src/LWidgets.h +++ b/src/LWidgets.h @@ -5,7 +5,6 @@ /* Describes and manages individual 2D GUI elements in the launcher. Copyright 2014-2021 ClassiCube | Licensed under BSD-3 */ -struct LScreen; struct FontDesc; struct LWidgetVTABLE { @@ -57,8 +56,7 @@ struct LButton { cc_string text; int _textWidth, _textHeight; }; -CC_NOINLINE void LButton_Init(struct LScreen* s, struct LButton* w, int width, int height, const char* text); -CC_NOINLINE void LButton_Init2(struct LButton* w, int width, int height, const char* text); +CC_NOINLINE void LButton_Init(struct LButton* w, int width, int height, const char* text); CC_NOINLINE void LButton_SetConst(struct LButton* w, const char* text); struct LCheckbox { @@ -68,8 +66,7 @@ struct LCheckbox { cc_string text; char _textBuffer[STRING_SIZE]; }; -CC_NOINLINE void LCheckbox_Init(struct LScreen* s, struct LCheckbox* w, const char* text); -CC_NOINLINE void LCheckbox_Init2(struct LCheckbox* w, const char* text); +CC_NOINLINE void LCheckbox_Init(struct LCheckbox* w, const char* text); struct LInput; struct LInput { @@ -93,8 +90,7 @@ struct LInput { int _textHeight; char _textBuffer[STRING_SIZE]; }; -CC_NOINLINE void LInput_Init(struct LScreen* s, struct LInput* w, int width, const char* hintText); -CC_NOINLINE void LInput_Init2(struct LInput* w, int width, const char* hintText); +CC_NOINLINE void LInput_Init(struct LInput* w, int width, const char* hintText); CC_NOINLINE void LInput_SetText(struct LInput* w, const cc_string* text); CC_NOINLINE void LInput_ClearText(struct LInput* w); @@ -112,8 +108,7 @@ struct LLabel { cc_string text; char _textBuffer[STRING_SIZE]; }; -CC_NOINLINE void LLabel_Init(struct LScreen* s, struct LLabel* w, const char* text); -CC_NOINLINE void LLabel_Init2(struct LLabel* w, const char* text); +CC_NOINLINE void LLabel_Init(struct LLabel* w, const char* text); CC_NOINLINE void LLabel_SetText(struct LLabel* w, const cc_string* text); CC_NOINLINE void LLabel_SetConst(struct LLabel* w, const char* text); @@ -121,17 +116,15 @@ CC_NOINLINE void LLabel_SetConst(struct LLabel* w, const char* text); struct LLine { LWidget_Layout }; -CC_NOINLINE void LLine_Init(struct LScreen* s, struct LLine* w, int width); -CC_NOINLINE void LLine_Init2(struct LLine* w, int width); +CC_NOINLINE void LLine_Init(struct LLine* w, int width); /* Represents a slider bar that may or may not be modifiable by the user. */ struct LSlider { LWidget_Layout int value, maxValue; - BitmapCol col; + BitmapCol color; }; -CC_NOINLINE void LSlider_Init(struct LScreen* s, struct LSlider* w, int width, int height, BitmapCol col); -CC_NOINLINE void LSlider_Init2(struct LSlider* w, int width, int height, BitmapCol col); +CC_NOINLINE void LSlider_Init(struct LSlider* w, int width, int height, BitmapCol color); struct ServerInfo; struct DrawTextArgs;