# Turn Portrait Background On/Off

Grammar — Turn Portrait background BackgroundVisible
FlagsNative | Action

Turns a portrait’s background on or off.

# Arguments

  • int<portrait> — Portrait
  • bool<preset::OnOffOption> — On/Off

Returns — void

native void PortraitSetBackgroundVisible(
	int p,
	bool isBackgroundVisible,
);

Category: Portrait / Advanced

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10374

    PortraitCreate(0, 0, c_anchorCenter, 237, 360, null, "", "Stand", false, true);
    gv_zPlanetPanel_PortraitPlanet = PortraitLastCreated();
    PortraitSetBackgroundVisible(PortraitLastCreated(), false);
    PortraitSetBorderVisible(PortraitLastCreated(), false);
    PortraitSetFullscreen(PortraitLastCreated(), true);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:10379

    PortraitCreate(0, 0, c_anchorCenter, 237, 360, "SMZeratulMissionSelectBorder", "", "Stand", false, true);
    gv_zPlanetPanel_PortraitBorder = PortraitLastCreated();
    PortraitSetBackgroundVisible(PortraitLastCreated(), false);
    PortraitSetBorderVisible(PortraitLastCreated(), false);
    PortraitSetFullscreen(PortraitLastCreated(), true);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:13538

    gv_briefing_TZeratulPortraitZeratul = PortraitLastCreated();
    PortraitSetFullscreen(PortraitLastCreated(), true);
    PortraitSetBackgroundVisible(PortraitLastCreated(), false);
    PortraitSetBorderVisible(PortraitLastCreated(), false);
    PortraitWaitForLoad(PortraitLastCreated());

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:15151

    PortraitUseTransition(PortraitLastCreated(), false);
    gv_newItems[lv_newItemIndex].lv_flash = PortraitLastCreated();
    PortraitSetBackgroundVisible(PortraitLastCreated(), false);
    PortraitSetBorderVisible(PortraitLastCreated(), false);
    gf_MoveNewItem(lv_newItemIndex, lv_offset, 0.0);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10374

    PortraitCreate(0, 0, c_anchorCenter, 237, 360, null, "", "Stand", false, true);
    gv_zPlanetPanel_PortraitPlanet = PortraitLastCreated();
    PortraitSetBackgroundVisible(PortraitLastCreated(), false);
    PortraitSetBorderVisible(PortraitLastCreated(), false);
    PortraitSetFullscreen(PortraitLastCreated(), true);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:10379

    PortraitCreate(0, 0, c_anchorCenter, 237, 360, "SMZeratulMissionSelectBorder", "", "Stand", false, true);
    gv_zPlanetPanel_PortraitBorder = PortraitLastCreated();
    PortraitSetBackgroundVisible(PortraitLastCreated(), false);
    PortraitSetBorderVisible(PortraitLastCreated(), false);
    PortraitSetFullscreen(PortraitLastCreated(), true);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:13538

    gv_briefing_TZeratulPortraitZeratul = PortraitLastCreated();
    PortraitSetFullscreen(PortraitLastCreated(), true);
    PortraitSetBackgroundVisible(PortraitLastCreated(), false);
    PortraitSetBorderVisible(PortraitLastCreated(), false);
    PortraitWaitForLoad(PortraitLastCreated());

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:15151

    PortraitUseTransition(PortraitLastCreated(), false);
    gv_newItems[lv_newItemIndex].lv_flash = PortraitLastCreated();
    PortraitSetBackgroundVisible(PortraitLastCreated(), false);
    PortraitSetBorderVisible(PortraitLastCreated(), false);
    gf_MoveNewItem(lv_newItemIndex, lv_offset, 0.0);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:1504

        libSwaC_gv_zS_PlanetPortrait = PortraitLastCreated();
        PortraitSetOffscreen(libSwaC_gv_zS_PlanetPortrait, true);
        PortraitSetBackgroundVisible(libSwaC_gv_zS_PlanetPortrait, false);
        PortraitSetBorderVisible(libSwaC_gv_zS_PlanetPortrait, false);
        PortraitUseTransition(PortraitLastCreated(), false);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:2010

        libVCMI_gv_pM_PlanetPortrait = PortraitLastCreated();
        PortraitSetOffscreen(libVCMI_gv_pM_PlanetPortrait, true);
        PortraitSetBackgroundVisible(libVCMI_gv_pM_PlanetPortrait, false);
        PortraitSetBorderVisible(libVCMI_gv_pM_PlanetPortrait, false);
        PortraitUseTransition(PortraitLastCreated(), false);

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:2690

        libNCMI_gv_NM_PlanetPortrait = PortraitLastCreated();
        PortraitSetOffscreen(libNCMI_gv_NM_PlanetPortrait, true);
        PortraitSetBackgroundVisible(libNCMI_gv_NM_PlanetPortrait, false);
        PortraitSetBorderVisible(libNCMI_gv_NM_PlanetPortrait, false);
        PortraitUseTransition(PortraitLastCreated(), false);

mods/voidprologue.sc2modbase.sc2data/LibA3DDD02B.galaxy:1190

        libA3DDD02B_gv_pP_PlanetPortrait = PortraitLastCreated();
        PortraitSetOffscreen(libA3DDD02B_gv_pP_PlanetPortrait, true);
        PortraitSetBackgroundVisible(libA3DDD02B_gv_pP_PlanetPortrait, false);
        PortraitSetBorderVisible(libA3DDD02B_gv_pP_PlanetPortrait, false);
        PortraitUseTransition(PortraitLastCreated(), false);