Jump to content
Sign in to follow this  
drunken officer

Dialog with map, problems with zoom

Recommended Posts

Hello everybody.

 

I've a problem and i can't fix it. I've create my own dialog with a map inside. And there is a last problem.

 

If i start the dialog with addaction command or i start the dialog inside the debug controll  with [] execVM "Arty\start_realarty.sqf", i can zoom the map with the mouse wheel. To move the map i can use the RMB.

If i start the dialog with a trigger or with communication menu, i can not zoom the map with the mouse wheel. I've to use +/- (numpad). To move the map i can use the RMB.

 

Can somebody help me to fix it?

 

Here are he code



class DOFARTY_RscMapControl

{

    idc = -1;

    type=101;

    style=48;

    moveOnEdges = 1;

    x = 0;

    y = 0;

    w = 1;

    h = 1;

    shadow = 0;

    ptsPerSquareSea = 5;

    ptsPerSquareTxt = 3;

    ptsPerSquareCLn = 10;

    ptsPerSquareExp = 10;

    ptsPerSquareCost = 10;

    ptsPerSquareFor = 9;

    ptsPerSquareForEdge = 9;

    ptsPerSquareRoad = 6;

    ptsPerSquareObj = 9;

    showCountourInterval = 0;

    scaleMin = 0.001000;

    scaleMax = 1.000000;

    scaleDefault = 0.160000;

    maxSatelliteAlpha = 0.850000;

    alphaFadeStartScale = 0.350000;

    alphaFadeEndScale = 0.400000;

    colorBackground[] = {0.969000, 0.957000, 0.949000, 1.000000};

    colorText[] = {0, 0, 0, 1};

    colorSea[] = {0.467000, 0.631000, 0.851000, 0.500000};

    colorForest[] = {0.624000, 0.780000, 0.388000, 0.500000};

    colorForestBorder[] = {0.000000, 0.000000, 0.000000, 0.000000};

    colorRocks[] = {0.000000, 0.000000, 0.000000, 0.300000};

    colorRocksBorder[] = {0.000000, 0.000000, 0.000000, 0.000000};

    colorLevels[] = {0.286000, 0.177000, 0.094000, 0.500000};

    colorMainCountlines[] = {0.572000, 0.354000, 0.188000, 0.500000};

    colorCountlines[] = {0.572000, 0.354000, 0.188000, 0.250000};

    colorMainCountlinesWater[] = {0.491000, 0.577000, 0.702000, 0.600000};

    colorCountlinesWater[] = {0.491000, 0.577000, 0.702000, 0.300000};

    colorPowerLines[] = {0.100000, 0.100000, 0.100000, 1.000000};

    colorRailWay[] = {0.800000, 0.200000, 0.000000, 1.000000};

    colorNames[] = {0.100000, 0.100000, 0.100000, 0.900000};

    colorInactive[] = {1.000000, 1.000000, 1.000000, 0.500000};

    colorOutside[] = {0.000000, 0.000000, 0.000000, 1.000000};

    colorTracks[] = {0.840000, 0.760000, 0.650000, 0.150000};

    colorTracksFill[] = {0.840000, 0.760000, 0.650000, 1.000000};

    colorRoads[] = {0.700000, 0.700000, 0.700000, 1.000000};

    colorRoadsFill[] = {1.000000, 1.000000, 1.000000, 1.000000};

    colorMainRoads[] = {0.900000, 0.500000, 0.300000, 1.000000};

    colorMainRoadsFill[] = {1.000000, 0.600000, 0.400000, 1.000000};

    colorGrid[] = {0.100000, 0.100000, 0.100000, 0.600000};

    colorGridMap[] = {0.100000, 0.100000, 0.100000, 0.600000};

    font = "TahomaB";

    sizeEx = 0.04;

    fontLabel = "PuristaMedium";

    sizeExLabel = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";

    fontGrid = "TahomaB";

    sizeExGrid = 0.020000;

    fontUnits = "TahomaB";

    sizeExUnits = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";

    fontNames = "PuristaMedium";

    sizeExNames = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8) * 2";

    fontInfo = "PuristaMedium";

    sizeExInfo = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";

    fontLevel = "TahomaB";

    sizeExLevel = 0.020000;

    text = "#(argb,8,8,3)color(1,1,1,1)";

    class Legend

        {

        x = "SafeZoneX + (((safezoneW / safezoneH) min 1.2) / 40)";

        y = "SafeZoneY + safezoneH - 4.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";

        w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)";

        h = "3.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";

        font = "PuristaMedium";

        sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";

        colorBackground[] = {1, 1, 1, 0.500000};

        color[] = {0, 0, 0, 1};

        };

    class Task

        {

        icon = "\A3\ui_f\data\map\mapcontrol\taskIcon_CA.paa";

        iconCreated = "\A3\ui_f\data\map\mapcontrol\taskIconCreated_CA.paa";

        iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa";

        iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa";

        iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_CA.paa";

        color[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])", "(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])", "(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])", "(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"};

        colorCreated[] = {1, 1, 1, 1};

        colorCanceled[] = {0.700000, 0.700000, 0.700000, 1};

        colorDone[] = {0.700000, 1, 0.300000, 1};

        colorFailed[] = {1, 0.300000, 0.200000, 1};

        size = 27;

        importance = 1;

        coefMin = 1;

        coefMax = 1;

        };

    class Waypoint

        {

        icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa";

        color[] = {0, 0, 0, 1};

        size = 20;

        coefMin = 0.9;

        coefMax = 4;

        importance = "1.2 * 16 * 0.05";

        };

    class WaypointCompleted

        {

        icon = "\A3\ui_f\data\map\mapcontrol\waypointCompleted_ca.paa";

        color[] = {0, 0, 0, 1};

        size = 20;

        coefMin = 0.9;

        coefMax = 4;

        importance = "1.2 * 16 * 0.05";

        };

    class ActiveMarker

        {

        icon = "\ca\ui\data\map_waypoint_completed_ca.paa";

        size = 20;

        color[] = {0, 0.9, 0, 1};

        importance = "1.2 * 16 * 0.05";

        coefMin = 0.9;

        coefMax = 4;

        };

    class CustomMark

        {

        icon = "\A3\ui_f\data\map\mapcontrol\custommark_ca.paa";

        size = 24;

        importance = 1;

        coefMin = 1;

        coefMax = 1;

        color[] = {0, 0, 0, 1};

        };

    class Command

        {

        icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa";

        size = 18;

        importance = 1;

        coefMin = 1;

        coefMax = 1;

        color[] = {1, 1, 1, 1};

        };

    class Bush

        {

        icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";

        color[] = {0.450000, 0.640000, 0.330000, 0.400000};

        size = "14/2";

        importance = "0.2 * 14 * 0.05 * 0.05";

        coefMin = 0.250000;

        coefMax = 4;

        };

    class Rock

        {

        icon = "\A3\ui_f\data\map\mapcontrol\rock_ca.paa";

        color[] = {0.100000, 0.100000, 0.100000, 0.800000};

        size = 12;

        importance = "0.5 * 12 * 0.05";

        coefMin = 0.250000;

        coefMax = 4;

        };

    class SmallTree

        {

        icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";

        color[] = {0.450000, 0.640000, 0.330000, 0.400000};

        size = 12;

        importance = "0.6 * 12 * 0.05";

        coefMin = 0.250000;

        coefMax = 4;

        };

class Tree

{

icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";

color[] = {0.450000, 0.640000, 0.330000, 0.400000};

size = 12;

importance = "0.9 * 16 * 0.05";

coefMin = 0.250000;

coefMax = 4;

};

class busstop

{

icon = "\A3\ui_f\data\map\mapcontrol\busstop_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {1, 1, 1, 1};

};

class fuelstation

{

icon = "\A3\ui_f\data\map\mapcontrol\fuelstation_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {1, 1, 1, 1};

};

class hospital

{

icon = "\A3\ui_f\data\map\mapcontrol\hospital_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {1, 1, 1, 1};

};

class church

{

icon = "\A3\ui_f\data\map\mapcontrol\church_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {1, 1, 1, 1};

};

class lighthouse

{

icon = "\A3\ui_f\data\map\mapcontrol\lighthouse_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {1, 1, 1, 1};

};

class power

{

icon = "\A3\ui_f\data\map\mapcontrol\power_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {1, 1, 1, 1};

};

class powersolar

{

icon = "\A3\ui_f\data\map\mapcontrol\powersolar_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {1, 1, 1, 1};

};

class powerwave

{

icon = "\A3\ui_f\data\map\mapcontrol\powerwave_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {1, 1, 1, 1};

};

class powerwind

{

icon = "\A3\ui_f\data\map\mapcontrol\powerwind_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {1, 1, 1, 1};

};

class quay

{

icon = "\A3\ui_f\data\map\mapcontrol\quay_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {1, 1, 1, 1};

};

class shipwreck

{

icon = "\A3\ui_f\data\map\mapcontrol\shipwreck_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {1, 1, 1, 1};

};

class transmitter

{

icon = "\A3\ui_f\data\map\mapcontrol\transmitter_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {1, 1, 1, 1};

};

class watertower

{

icon = "\A3\ui_f\data\map\mapcontrol\watertower_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {1, 1, 1, 1};

};

class Cross

{

icon = "\A3\ui_f\data\map\mapcontrol\Cross_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {0, 0, 0, 1};

};

class Chapel

{

icon = "\A3\ui_f\data\map\mapcontrol\Chapel_CA.paa";

size = 24;

importance = 1;

coefMin = 0.850000;

coefMax = 1.000000;

color[] = {0, 0, 0, 1};

};

class Bunker

{

icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa";

size = 14;

importance = "1.5 * 14 * 0.05";

coefMin = 0.250000;

coefMax = 4;

color[] = {0, 0, 0, 1};

};

class Fortress

{

icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa";

size = 16;

importance = "2 * 16 * 0.05";

coefMin = 0.250000;

coefMax = 4;

color[] = {0, 0, 0, 1};

};

class Fountain

{

icon = "\A3\ui_f\data\map\mapcontrol\fountain_ca.paa";

size = 11;

importance = "1 * 12 * 0.05";

coefMin = 0.250000;

coefMax = 4;

color[] = {0, 0, 0, 1};

};

class Ruin

{

icon = "\A3\ui_f\data\map\mapcontrol\ruin_ca.paa";

size = 16;

importance = "1.2 * 16 * 0.05";

coefMin = 1;

coefMax = 4;

color[] = {0, 0, 0, 1};

};

class Stack

{

icon = "\A3\ui_f\data\map\mapcontrol\stack_ca.paa";

size = 20;

importance = "2 * 16 * 0.05";

coefMin = 0.900000;

coefMax = 4;

color[] = {0, 0, 0, 1};

};

class Tourism

{

icon = "\A3\ui_f\data\map\mapcontrol\tourism_ca.paa";

size = 16;

importance = "1 * 16 * 0.05";

coefMin = 0.700000;

coefMax = 4;

color[] = {0, 0, 0, 1};

};

class ViewTower

{

icon = "\A3\ui_f\data\map\mapcontrol\viewtower_ca.paa";

size = 16;

importance = "2.5 * 16 * 0.05";

coefMin = 0.500000;

coefMax = 4;

color[] = {0, 0, 0, 1};

};



    

    

    

};
 class DOF_REALARTY_DIALOG

{

    idd = -1;

    movingenable = true;

    class controls     {   

  class DOF_MAP: DOFARTY_RscMapControl

          {

            idc = DOF_SUPPORT_Map;

            x = 0.3 + 0.185;

            y = 0 + (11 / 50);

            w    = 0.51;

            h    = 0.6;

          

            };
};
};

 

Share this post


Link to post
Share on other sites

JW, in you mission, you use addaction command.

I add a trigger to start the script. I cant zoom the map with my mouse wheel. :( Are you sure, that you can zoom your map, if you start the dialog by a trigger?

Share this post


Link to post
Share on other sites

You are right it doesn't work that way... cant you just make trigger call a script which calls the dialog script?

 

That doesn't work either.. hmm

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
Sign in to follow this  

×