Skip to content

Commit

Permalink
Use fmt in menus
Browse files Browse the repository at this point in the history
  • Loading branch information
Amaroq7 committed Aug 17, 2017
1 parent c4d86c0 commit e94a048
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions amxmodx/scripting/ctw.sma
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ ReadWiresFromFile()
while (!feof(hFile))
{
fgets(hFile, szLine, charsmax(szLine));

trim(szLine);

if(!szLine[0] || szLine[0] == ';' || (szLine[0] == '/' && szLine[1] == '/'))
Expand All @@ -263,12 +262,10 @@ ReadWiresFromFile()

MakeMenu()
{
new szItem[32];
g_hMenu = menu_create("Choose a wire", "MenuWiresHandler");
for (new i = 0; i < g_iWires; i++)
{
ArrayGetString(g_arrayWires, i, szItem, charsmax(szItem));
menu_additem(g_hMenu, szItem);
menu_additem(g_hMenu, fmt("%a", ArrayGetStringHandle(g_arrayWires, i)));
}
}

Expand All @@ -288,7 +285,6 @@ HideMenu(id)

SetupTitle(id)
{
static szTitle[32];
LookupLangKey(szTitle, charsmax(szTitle), "CHOOSE_WIRE", id);
menu_setprop(g_hMenu, MPROP_TITLE, szTitle);
SetGlobalTransTarget(id);
menu_setprop(g_hMenu, MPROP_TITLE, fmt("%l", "CHOOSE_WIRE"));
}

0 comments on commit e94a048

Please sign in to comment.