# Create Dialog

Grammar — Create a modal dialog of size (width, height) at (offsetX, offsetY) relative to anchor of screen
FlagsNative | Action

Creates a dialog box of specified width, height, position on the screen with offsets

# Arguments

  • int — Width
  • int — Height
  • int [ preset::Anchor ] — Anchor
  • int — OffsetX
  • int — OffsetY
  • bool [ preset::ModalNonmodalOption ] — Modal

Returns — int [ dialog ]

native int DialogCreate(
	int width,
	int height,
	int anchor,
	int offsetX,
	int offsetY,
	bool modal,
);

Category: Dialog / Dialogs

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L3546
DialogCreate(1000, 100, c_anchorCenter, 0, 0, false)
// L3578
DialogCreate((gv_bossHPBarWidth + 0), lv_barHight, c_anchorTopRight, 10, 10, false)
// L3601
DialogCreate(400, 30, c_anchorTopRight, 10, 10, false)
// L3626
DialogCreate((gv_unitHPBarWidth + 0), lv_barHight, c_anchorTopRight, 10, 55, false)
// L3649
DialogCreate(400, 30, c_anchorTopRight, 10, 10, false)
// L3678
DialogCreate(10, 10, c_anchorCenter, 0, 0, false)
// L3898
DialogCreate(2119, 1200, c_anchorCenter, 0, 0, true)
// L8496
DialogCreate(1, 1, c_anchorCenter, 0, 0, true)
// L2954
DialogCreate(500, 400, c_anchorCenter, 0, 0, true)
// L2322
DialogCreate(1, 1, c_anchorCenter, 0, 0, false)
// L2609
DialogCreate(800, 600, c_anchorCenter, 0, 0, true)
// L3452
DialogCreate(2119, 1200, c_anchorCenter, 0, 0, true)
// L3947
DialogCreate(1600, 1200, c_anchorCenter, 0, 0, false)
// L4730
DialogCreate(100, 100, c_anchorCenter, -50, -50, true)
// L4809
DialogCreate(100, 100, c_anchorCenter, -50, -50, true)
// L5078
DialogCreate(2048, 1026, c_anchorCenter, 0, 0, true)
// L10382
DialogCreate(1400, 400, c_anchorBottom, 0, 400, false)
// L10385
DialogCreate(1, 1, c_anchorCenter, 0, 0, false)
// L10670
DialogCreate(lp_width, lp_height, lp_anchor, lp_offsetX, lp_offsetY, true)
// L1248
DialogCreate(210, 90, c_anchorLeft, 42, 160, true)
// L1259
DialogCreate(1120, 1200, c_anchorCenter, 0, 0, true)
// L434
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L1661
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L965
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L1002
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L530
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L792
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L1509
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L1570
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L3546
DialogCreate(1000, 100, c_anchorCenter, 0, 0, false)
// L3578
DialogCreate((gv_bossHPBarWidth + 0), lv_barHight, c_anchorTopRight, 10, 10, false)
// L3601
DialogCreate(400, 30, c_anchorTopRight, 10, 10, false)
// L3626
DialogCreate((gv_unitHPBarWidth + 0), lv_barHight, c_anchorTopRight, 10, 55, false)
// L3649
DialogCreate(400, 30, c_anchorTopRight, 10, 10, false)
// L3678
DialogCreate(10, 10, c_anchorCenter, 0, 0, false)
// L3898
DialogCreate(2119, 1200, c_anchorCenter, 0, 0, true)
// L8496
DialogCreate(1, 1, c_anchorCenter, 0, 0, true)
// L2954
DialogCreate(500, 400, c_anchorCenter, 0, 0, true)
// L2322
DialogCreate(1, 1, c_anchorCenter, 0, 0, false)
// L2609
DialogCreate(800, 600, c_anchorCenter, 0, 0, true)
// L3452
DialogCreate(2119, 1200, c_anchorCenter, 0, 0, true)
// L3947
DialogCreate(1600, 1200, c_anchorCenter, 0, 0, false)
// L4730
DialogCreate(100, 100, c_anchorCenter, -50, -50, true)
// L4809
DialogCreate(100, 100, c_anchorCenter, -50, -50, true)
// L5078
DialogCreate(2048, 1026, c_anchorCenter, 0, 0, true)
// L10382
DialogCreate(1400, 400, c_anchorBottom, 0, 400, false)
// L10385
DialogCreate(1, 1, c_anchorCenter, 0, 0, false)
// L10670
DialogCreate(lp_width, lp_height, lp_anchor, lp_offsetX, lp_offsetY, true)
// L1248
DialogCreate(210, 90, c_anchorLeft, 42, 160, true)
// L1259
DialogCreate(1120, 1200, c_anchorCenter, 0, 0, true)
// L434
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L1661
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L965
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L1002
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L530
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L792
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L1509
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)
// L1570
DialogCreate(500, 400, c_anchorCenter, 0, 0, false)

# campaigns/libertystory.sc2campaign

CampaignLib.galaxy

// L1823
DialogCreate(FixedToInt(lv_w), FixedToInt(lv_h), lp_anchor, lv_x, lv_y, lp_modal)
// L1950
DialogCreate(lp_width, lp_height, c_anchorCenter, 0, 0, true)
// L2029
DialogCreate(1000, 600, c_anchorCenter, 0, 0, true)
// L5672
DialogCreate(500, 50, c_anchorBottom, 0, 0, false)
// L5681
DialogCreate(1600, 400, c_anchorBottom, 0, 70, false)
// L10570
DialogCreate(1500, 1100, c_anchorCenter, 0, 0, true)
// L10947
DialogCreate(1500, 420, c_anchorCenter, 0, 0, true)
// L11027
DialogCreate(900, 600, c_anchorCenter, 0, 0, true)
// L11071
DialogCreate(800, 400, c_anchorCenter, 0, 0, true)
// L13476
DialogCreate(400, 50, c_anchorTop, -500, 140, false)

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L2346
DialogCreate(210, 75, c_anchorCenter, 0, 0, true)
// L9861
DialogCreate(500, 400, c_anchorCenter, 0, 0, true)
// L6409
DialogCreate(gv_buttonSizeWidth, gv_buttonSizeHeight, c_anchorCenter, gv_button1stPositionX, gv_button1stPositionY, true)
// L6424
DialogCreate(gv_buttonSizeWidth, gv_buttonSizeHeight, c_anchorCenter, gv_button2ndPositionX, gv_button2ndPositionY, true)
// L761
DialogCreate(1600, 1200, c_anchorCenter, 0, 0, false)
// L720
DialogCreate(500, 400, c_anchorCenter, 0, 0, true)
// L2843
DialogCreate(350, 132, c_anchorTopRight, 10, 70, false)
// L5065
DialogCreate(500, 400, c_anchorTop, 0, 60, false)
// L2346
DialogCreate(210, 75, c_anchorCenter, 0, 0, true)
// L9861
DialogCreate(500, 400, c_anchorCenter, 0, 0, true)
// L6409
DialogCreate(gv_buttonSizeWidth, gv_buttonSizeHeight, c_anchorCenter, gv_button1stPositionX, gv_button1stPositionY, true)
// L6424
DialogCreate(gv_buttonSizeWidth, gv_buttonSizeHeight, c_anchorCenter, gv_button2ndPositionX, gv_button2ndPositionY, true)
// L761
DialogCreate(1600, 1200, c_anchorCenter, 0, 0, false)
// L720
DialogCreate(500, 400, c_anchorCenter, 0, 0, true)
// L2843
DialogCreate(350, 132, c_anchorTopRight, 10, 70, false)
// L5065
DialogCreate(500, 400, c_anchorTop, 0, 60, false)

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L570
DialogCreate(500, 400, c_anchorCenter, 0, 0, true)
// L1480
DialogCreate(500, 400, c_anchorCenter, 0, 0, true)
// L2033
DialogCreate(1600, 1200, c_anchorCenter, 0, 0, false)
// L4420
DialogCreate(1000, 400, c_anchorRight, -200, (libSwaC_gv_zS_AchievementPosition + 200), true)
// L6708
DialogCreate(500, 400, c_anchorCenter, 0, 0, true)
// L7404
DialogCreate(500, 400, c_anchorCenter, 0, 0, true)
// L8421
DialogCreate(400, 400, c_anchorCenter, 0, 0, true)
// L8482
DialogCreate(1920, 1200, c_anchorCenter, 0, 0, true)
// L8868
DialogCreate(1920, 1200, c_anchorCenter, 0, 0, true)
// L9299
DialogCreate(500, 400, c_anchorCenter, 0, 0, true)

# campaigns/swarmstoryutil.sc2mod

Lib281DEC45.galaxy

// L813
DialogCreate(500, 400, c_anchorCenter, 0, 0, true)
// L5031
DialogCreate(400, 400, c_anchorCenter, 0, 0, true)
// L5941
DialogCreate(500, 400, c_anchorCenter, 0, 0, true)
// L6300
DialogCreate(1620, 1220, c_anchorCenter, 0, 0, true)
// L6656
DialogCreate(1620, 1220, c_anchorCenter, 0, 0, true)
// L7265
DialogCreate(750, 850, c_anchorCenter, 0, 0, true)