@@ -136,7 +136,7 @@ static
136136
137137*/
138138
139- stock TextList_Show (playerid, function[])
139+ stock TextList_Show (playerid, const function[])
140140{
141141 new call_func[TEXTLIST_MAX_FUNCTION_NAME] = " tlc_" ;
142142 strcat (call_func, function);
@@ -171,11 +171,11 @@ stock TextList_Close(playerid)
171171 CancelSelectTextDraw (playerid);
172172}
173173
174- stock TextList_Open (playerid, function[], list_items[][], list_size = sizeof (list_items), header[] = " " ,
175- button1[] = " " , button2[] = " " , Float: pos_x = 89 .0 , Float: pos_y = 140 .0 ,
174+ stock TextList_Open (playerid, const function[], const list_items[][], const list_size = sizeof (list_items), const header[] = " " ,
175+ const button1[] = " " , const button2[] = " " , Float: pos_x = 89 .0 , Float: pos_y = 140 .0 ,
176176 select_color = 0x FFA500FF ,
177- lists_bg_color[TEXTLIST_MAX_ITEMS] = {0x 212121A0 , ...},
178- lists_fg_color[TEXTLIST_MAX_ITEMS] = {0x FFFFFFFF , ...},
177+ const lists_bg_color[TEXTLIST_MAX_ITEMS] = {0x 212121A0 , ...},
178+ const lists_fg_color[TEXTLIST_MAX_ITEMS] = {0x FFFFFFFF , ...},
179179 header_bg_color = 0x B71C1CAA , header_fg_color = 0x FFFFFFFF ,
180180 paginator_bg_color = 0x 21212160 , paginator_fg_color = 0x FFFFFFFF ,
181181 button1_bg_color = 0x 6D4C41AA , button1_fg_color = 0x FFFFFFFF ,
@@ -242,8 +242,8 @@ stock TextList_IsOpen(playerid)
242242
243243static stock TD_SetPage (playerid, & page_id, items_count,
244244 Float: pos_x, Float: pos_y,
245- buttons[][], list_item[][],
246- lists_bg_color[TEXTLIST_MAX_ITEMS], lists_fg_color[TEXTLIST_MAX_ITEMS],
245+ const buttons[][], const list_item[][],
246+ const lists_bg_color[TEXTLIST_MAX_ITEMS], const lists_fg_color[TEXTLIST_MAX_ITEMS],
247247 paginator_bg_color, paginator_fg_color,
248248 button1_bg_color, button1_fg_color,
249249 button2_bg_color, button2_fg_color)
@@ -360,7 +360,7 @@ static stock GetPaginatorInfo(items_count, &curr_page = 0, &max_page = 0, &start
360360 }
361361}
362362
363- static stock TD_ListCreate (playerid, item_id, text[], bg_color, fg_color, Float: pos_x, Float: pos_y)
363+ static stock TD_ListCreate (playerid, item_id, const text[], bg_color, fg_color, Float: pos_x, Float: pos_y)
364364{
365365 TD_ListItem[playerid][item_id] = CreatePlayerTextDraw (playerid, pos_x, pos_y, text);
366366 PlayerTextDrawLetterSize (playerid, TD_ListItem[playerid][item_id], 0 .22 , 1 .5 );
@@ -379,12 +379,12 @@ static stock TD_ListCreate(playerid, item_id, text[], bg_color, fg_color, Float:
379379 PlayerTextDrawShow (playerid, TD_ListItem[playerid][item_id]);
380380}
381381
382- static stock TD_ListUpdateText (playerid, item_id, text[])
382+ static stock TD_ListUpdateText (playerid, item_id, const text[])
383383{
384384 PlayerTextDrawSetString (playerid, TD_ListItem[playerid][item_id], text);
385385}
386386
387- static stock TD_PaginatorCreate (playerid, pagestr[], bg_color, fg_color, Float: pos_x, Float: pos_y)
387+ static stock TD_PaginatorCreate (playerid, const pagestr[], bg_color, fg_color, Float: pos_x, Float: pos_y)
388388{
389389 TD_ListUp[playerid] = CreatePlayerTextDraw (playerid, pos_x - 20 .0 , pos_y, " LD_BEAT:up" );
390390 PlayerTextDrawLetterSize (playerid, TD_ListUp[playerid], 0 .0 , 0 .0 );
@@ -443,12 +443,12 @@ static stock TD_PaginatorCreate(playerid, pagestr[], bg_color, fg_color, Float:p
443443 PlayerTextDrawShow (playerid, TD_ListBox[playerid]);
444444}
445445
446- static stock TD_PaginatorUpdateText (playerid, pagestr[])
446+ static stock TD_PaginatorUpdateText (playerid, const pagestr[])
447447{
448448 PlayerTextDrawSetString (playerid, TD_ListPage[playerid], pagestr);
449449}
450450
451- static stock TD_HeaderCreate (playerid, text[], bg_color, fg_color, Float: pos_x, Float: pos_y)
451+ static stock TD_HeaderCreate (playerid, const text[], bg_color, fg_color, Float: pos_x, Float: pos_y)
452452{
453453 TD_ListHeader[playerid] = CreatePlayerTextDraw (playerid, pos_x, pos_y, text);
454454 PlayerTextDrawLetterSize (playerid, TD_ListHeader[playerid], 0 .3 , 1 .5 );
@@ -466,7 +466,7 @@ static stock TD_HeaderCreate(playerid, text[], bg_color, fg_color, Float:pos_x,
466466 PlayerTextDrawShow (playerid, TD_ListHeader[playerid]);
467467}
468468
469- static stock TD_ButtonCreate (playerid, & PlayerText: button, text[], bg_color, fg_color, Float: pos_x, Float: pos_y)
469+ static stock TD_ButtonCreate (playerid, & PlayerText: button, const text[], bg_color, fg_color, Float: pos_x, Float: pos_y)
470470{
471471 button = CreatePlayerTextDraw (playerid, pos_x, pos_y, text);
472472 PlayerTextDrawLetterSize (playerid, button, 0 .25 , 1 .4 );
@@ -664,7 +664,7 @@ public OnPlayerClickTextDraw(playerid, Text:clickedid)
664664
665665*/
666666
667- static stock TL_strcpy (result[], source[], const size = sizeof (result))
667+ static stock TL_strcpy (result[], const source[], const size = sizeof (result))
668668{
669669 result[0 ] = 0 ;
670670 return strcat (result, source, size);
0 commit comments