PDA

Просмотр полной версии : [Вопрос] Селектабельные текстдравы



Mazzilla
12.07.2014, 15:40
Доброе время суток. Пытаюсь научиться использовать текстдравы, возникает такая проблема:
Текстдравы "<<<", "SELECT", ">>>", "X" - 4 отдельных текстдрава, но когда использую функцию SelectTextDraw(playerid, 0x0099FFff);
при наведении на один текстдрав, к примеру, "<<<", выделяются все три. Если курсор переведу ниже, то выделяется и "X".
Ранее видел урок в интернете, как настроить, чтобы выделялся один текстдрав, но сейчас подключен низкоскоростной тариф, поэтому, проблематично найти что-либо в интернете, надежда на ваш портал. :smile: Знатоки, объясните, пожалуйста, как настроить текстдравы.

textdraw_automarket[playerid][7] = CreatePlayerTextDraw(playerid, 447.000000, 246.166687, "<<<");
PlayerTextDrawLetterSize(playerid, textdraw_automarket[playerid][7], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, textdraw_automarket[playerid][7], 2);
PlayerTextDrawColor(playerid, textdraw_automarket[playerid][7], -1);
PlayerTextDrawSetShadow(playerid, textdraw_automarket[playerid][7], 0);
PlayerTextDrawSetOutline(playerid, textdraw_automarket[playerid][7], 1);
PlayerTextDrawBackgroundColor(playerid, textdraw_automarket[playerid][7], 51);
PlayerTextDrawFont(playerid, textdraw_automarket[playerid][7], 0);
PlayerTextDrawSetProportional(playerid, textdraw_automarket[playerid][7], 1);
PlayerTextDrawSetSelectable(playerid, textdraw_automarket[playerid][7], true);

textdraw_automarket[playerid][8] = CreatePlayerTextDraw(playerid, 589.000000, 246.166656, ">>>");
PlayerTextDrawLetterSize(playerid, textdraw_automarket[playerid][8], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, textdraw_automarket[playerid][8], 2);
PlayerTextDrawColor(playerid, textdraw_automarket[playerid][8], -1);
PlayerTextDrawSetShadow(playerid, textdraw_automarket[playerid][8], 0);
PlayerTextDrawSetOutline(playerid, textdraw_automarket[playerid][8], 1);
PlayerTextDrawBackgroundColor(playerid, textdraw_automarket[playerid][8], 51);
PlayerTextDrawFont(playerid, textdraw_automarket[playerid][8], 0);
PlayerTextDrawSetProportional(playerid, textdraw_automarket[playerid][8], 1);
PlayerTextDrawSetSelectable(playerid, textdraw_automarket[playerid][8], true);

textdraw_automarket[playerid][9] = CreatePlayerTextDraw(playerid, 516.500000, 245.583343, "SELECT");
PlayerTextDrawLetterSize(playerid, textdraw_automarket[playerid][9], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, textdraw_automarket[playerid][9], 2);
PlayerTextDrawColor(playerid, textdraw_automarket[playerid][9], -1);
PlayerTextDrawSetShadow(playerid, textdraw_automarket[playerid][9], 0);
PlayerTextDrawSetOutline(playerid, textdraw_automarket[playerid][9], 1);
PlayerTextDrawBackgroundColor(playerid, textdraw_automarket[playerid][9], 51);
PlayerTextDrawFont(playerid, textdraw_automarket[playerid][9], 1);
PlayerTextDrawSetProportional(playerid, textdraw_automarket[playerid][9], 1);
PlayerTextDrawSetSelectable(playerid, textdraw_automarket[playerid][9], true);

textdraw_automarket[playerid][10] = CreatePlayerTextDraw(playerid, 610.000000, 268.333282, "X");
PlayerTextDrawLetterSize(playerid, textdraw_automarket[playerid][10], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, textdraw_automarket[playerid][10], 2);
PlayerTextDrawColor(playerid, textdraw_automarket[playerid][10], -16776961);
PlayerTextDrawSetShadow(playerid, textdraw_automarket[playerid][10], 0);
PlayerTextDrawSetOutline(playerid, textdraw_automarket[playerid][10], 1);
PlayerTextDrawBackgroundColor(playerid, textdraw_automarket[playerid][10], 51);
PlayerTextDrawFont(playerid, textdraw_automarket[playerid][10], 1);
PlayerTextDrawSetProportional(playerid, textdraw_automarket[playerid][10], 1);
PlayerTextDrawSetSelectable(playerid, textdraw_automarket[playerid][10], true);
http://imgdepo.ru/id/i6986254

DeimoS
12.07.2014, 17:14
PlayerTextDrawLetterSize отвечает за выделяемую зону. В этой функцие указывается координата точки на экране, которая будет находиться в нижнем правом углу выделяемой зоны

MR_BEN
12.07.2014, 18:13
PlayerTextDrawLetterSize отвечает за выделяемую зону. В этой функции указывается координата точки на экране, которая будет находиться в нижнем правом углу выделяемой зоны

Разве не PlayerTextDrawTextSize?

- - - Добавлено - - -

И массив MAX_PLAYERS можно было не создавать.

Mazzilla
13.07.2014, 20:00
Хорошо. С этим разобрался, но теперь не могу настроить эту область. Использую iPleomax, в котором поясняют: Hold LMB and MOVE cursor to resize (Зажмите ЛКМ и перемещайте курсор для изменения размера). Зажимаю в верхней левой точке текстдрава ЛКМ и перемещаю в нижнюю правую точку (провожу диагональ текстдрава). И всё равно что-то не то... Вообще не выделяются текстдравы.

Spectrum
13.07.2014, 21:20
textdrawtextsize, в данном случае playertextdraw

MR_BEN
13.07.2014, 21:33
Держи (http://pro-pawn.ru/showthread.php?7142-%D0%9F%D0%BE%D0%BB%D0%B5-TextDrawTextSize-ALL-%D0%92%D0%B8%D0%B4%D0%B5%D0%BE), понятно разъясняет(в IPLEOMAX)

Mazzilla
13.07.2014, 22:20
Закрыто. Спасибо за ответы.