English Scrollbar in garage

Yuri Zoko

Leader
Membre du personnel
31/3/20
462
77
62
1 300
Hi!

With all the TP scripts that add lines in the garage, sometimes you don't have enough space to display everything.

To start, open your impound.hpp in the dialog folder and find this class :

Code:
class vehicleInfomationList: Life_RscStructuredText {
            idc = 2803;
            text = "";
            sizeEx = 0.035;
            x = 0.41;
            y = 0.3;
            w = 0.5;
            h = 0.5;
        };

replace it with this one:

Code:
class vehicleInfomationList: Life_RscControlsGroup {
            idc = 2803;
            text = "";
            sizeEx = 0.035;
            x = 0.41;
            y = 0.3;
            w = 0.5;
            h = 0.5;
            class Controls {
                class displayInfo: Life_RscStructuredText {
                    idc = 28020;
                    x = 0;
                    y = 0;
                    w = 0.5;
                    h = 0.5;
                    sizeEx = 0.035;
                };
            };
        };

Then, in your garageLBChange.sqf in the dialog/function folder, find this line:
Code:
(CONTROL(2800,2803)) ctrlSetStructuredText parseText format [

Then replace it with this block:
Code:
_control = findDisplay 2800 displayCtrl 28020;
_myControlPos = ctrlPosition _control;
_oldH = _myControlPos select 3;

_control ctrlSetStructuredText parseText format [

At the bottom of the file, look for :
Code:
ctrlShow [2803,true];
ctrlShow [2830,true];

Add above :
Code:
_newH = ctrlTextHeight _control;
_control ctrlSetPosition [(_myControlPos select 0),(_myControlPos select 1),(_myControlPos select 2),_newH];
_control ctrlCommit 0;

You now have a garage with a scrollbar!​