Jump to content
LoOni3r

dialog ListScrollBar with coluns

Recommended Posts

Hello everybody,

 

I dont get any further..
In my dialogue I would like to insert colums.

 

.hpp:

...
		class list
		{
			type = 5;
			idc = 1;
			x = safeZoneX + safeZoneW * 0.3925;
			y = safeZoneY + safeZoneH * 0.15111112;
			w = safeZoneW * 0.2;
			h = safeZoneH * 0.69111112;
			style = 16;
			colorBackground[] = {0,0,0,1};
			colorDisabled[] = {0.2,0.2,0.2,1};
			colorSelect[] = {0.702,0.702,0.102,1};
			colorText[] = {1,1,1,1};
			font = "PuristaMedium";
			maxHistoryDelay = 0;
			rowHeight = 0;


// columns[] = {0.1,0.4}; <- test



			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			soundSelect[] = {"\A3\ui_f\data\sound\RscListbox\soundSelect",0.09,1.0};
			class ListScrollBar
			{
				color[] = {1,1,1,1};
				thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
				arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
				arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
				border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
				
			};
			onLBSelChanged = [_this] execVM "menu\arsenal\info.sqf";
		};
...

 

sqf

_control lnbAddRow["asd","123"];

I'm not sure how to do it at the SQF.

have tested a lot but nothing worked.

Thank you for your time and help.

 

Share this post


Link to post
Share on other sites

hi,

 

In my list I listed all weapons.

If I now press "C" to get to CAR-95 ... he goes to the last entry.

 

what do I have to change so that he jumps to "CAR-95 .." if I press "C"?

 

.hpp:

		class list
		{
			type = 102;
			idc = 1;
			x = safeZoneX + safeZoneW * 0.3;
			y = safeZoneY + safeZoneH * 0.12888889;
			w = safeZoneW * 0.4;
			h = safeZoneH * 0.74333334;
			style = 16;
			colorBackground[] = {0,0,0,1};
			colorDisabled[] = {0.2,0.2,0.2,1};
			colorSelect[] = {0.702,0.702,0.102,1};
			colorText[] = {1,1,1,1};
			font = "PuristaMedium";
			maxHistoryDelay = 0;
			rowHeight = 0;
			columns[] = {0,0.35,0.45,0.55,0.65,0.75,0.85};
			drawsidearrows = 0;
			idcLeft = 0;
			idcRight = 0;
			sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
			soundSelect[] = {"\A3\ui_f\data\sound\RscListbox\soundSelect",0.09,1.0};
			class ListScrollBar
			{
				color[] = {1,1,1,1};
				thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
				arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
				arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
				border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
				
			};
				onLBSelChanged = "";
		};

 

 

 

Share this post


Link to post
Share on other sites

I just tested it and I have the opposite case. When I press a key it goes to the first entry. This is the class:

class RscListNBox
{
    idc = 1500;
    deletable = 0;
    fade = 0;
    access = 0;
    type = CT_LISTNBOX;
    rowHeight = 0;
    colorText[] = {1,1,1,1};
    colorScrollbar[] = {0.95,0.95,0.95,1};
    colorSelect[] = {0,0,0,1};
    colorSelect2[] = {0,0,0,1};
    colorSelectBackground[] = {0.95,0.95,0.95,1};
    colorSelectBackground2[] = {1,1,1,0.5};
    colorBackground[] = {0,0,0,1};
    maxHistoryDelay = 1;
    soundSelect[] =
    {
        "",
        0.1,
        1
    };
    autoScrollSpeed = -1;
    autoScrollDelay = 5;
    autoScrollRewind = 0;
    arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
    arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
    drawSideArrows = 0;
    columns[] = {0.001};
    idcLeft = -1;
    idcRight = -1;
    class ListScrollBar: ScrollBar
    {
    };
    style = ST_MULTI;
    shadow = 0;
    font = "RobotoCondensed";
    sizeEx = GUI_TEXT_SIZE_MEDIUM;
    color[] = {0.95,0.95,0.95,1};
    colorDisabled[] = {1,1,1,0.25};
    colorPicture[] = {1,1,1,1};
    colorPictureSelected[] = {1,1,1,1};
    colorPictureDisabled[] = {1,1,1,1};
    period = 1.2;
    x = 0;
    y = 0;
    w = 10 * GUI_GRID_W;
    h = 10 * GUI_GRID_H;
    class ScrollBar: ScrollBar
    {
    };
};

This is the script I wrote to test it:

params ["_display"];
disableserialization;
_listbox = _display displayCtrl 1500;

_alphabet = "qwertzuiopasdfghjklyxcvbnm" splitstring "";
{
	for "_i" from 0 to 2 do {_listbox lnbaddrow [_x];};
} forEach _alphabet;

lbsort _listbox;

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×