Skip to content

Instantly share code, notes, and snippets.

@fingerboxes
Created October 7, 2016 23:29
Show Gist options
  • Save fingerboxes/f4e60267721fc9f4403c4ab2db8b352c to your computer and use it in GitHub Desktop.
Save fingerboxes/f4e60267721fc9f4403c4ab2db8b352c to your computer and use it in GitHub Desktop.
fuck ui code
public void OnLaunchClick()
{
PopupDialog.SpawnPopupDialog(new Vector2(0.5f, 0.5f),
new Vector2(0.5f, 0.5f),
new MultiOptionDialog("",
"Vessel Build Summary",
HighLogic.UISkin,
new Rect(0.5f, 0.5f, 300f, 300f),
new DialogGUIFlexibleSpace(),
new DialogGUIHorizontalLayout(
new DialogGUIVerticalLayout(
new DialogGUIFlexibleSpace(),
new DialogGUILabel("Estimated Build Cost"),
new DialogGUIFlexibleSpace()
),
new DialogGUIFlexibleSpace(),
new DialogGUIVerticalLayout(
new DialogGUIFlexibleSpace(),
new DialogGUIBox("999,999,999,9999", 150f, 30f),
new DialogGUIFlexibleSpace()
)
),
new DialogGUIHorizontalLayout(
new DialogGUIVerticalLayout(
new DialogGUIFlexibleSpace(),
new DialogGUILabel("Estimated Build Time"),
new DialogGUIFlexibleSpace()
),
new DialogGUIFlexibleSpace(),
new DialogGUIVerticalLayout(
new DialogGUIFlexibleSpace(),
new DialogGUIBox("999 Years, 999 Days, 999 Minutes, 999 Seconds", 150f, 30f),
new DialogGUIFlexibleSpace()
)
),
new DialogGUIFlexibleSpace(),
new DialogGUIHorizontalLayout(
new DialogGUIFlexibleSpace(),
new DialogGUIButton("Confirm",
delegate
{
SaveShip();
}, 140.0f, 30.0f, true),
new DialogGUIButton("Cancel", () => { }, 140.0f, 30.0f, true)
)),
false,
HighLogic.UISkin);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment