function CreateField(string OBJ, float y, string label)
string PTR;
create Text $(OBJ)
( XuNguiPosition = (100,y),
XuNguiWidth = 100,
XuNguiMultilineEdit = false
);
PTR = OBJ+"Label";
create Label $(PTR)
( XuNguiPosition = (3,y+2),
XuNguiLabel = label+":"
);
PTR = OBJ+"Button";
create Button $PTR
( XuNguiPosition = (202,y),
XuNguiLabel = "..."
);
endfunction
if exists(gsharp_1.mydialog) destroy gsharp_1.mydialog;
create Dialog gsharp_1.mydialog
( XuNguiDialogType = "template",
XuNguiTitle = "Resource Editor",
XuNguiWidth = 250,
XuNguiHeight = 165
);
create Bulletin gsharp_1.mydialog.Bull;
create Label gsharp_1.mydialog.Bull.label1
( XuNguiPosition = (3,0),
XuNguiLabel = "Resource"
);
create Label gsharp_1.mydialog.Bull.label2
( XuNguiPosition = (130,0),
XuNguiLabel = "Value"
);
create Separator gsharp_1.mydialog.Bull.sep
( XuNguiPosition = (0,23),
XuNguiWidth = 230,
XuNguiHeight = 65,
XuNguiSensitive = false
);
CreateField("gsharp_1.mydialog.Bull.height", 30, "Height");
CreateField("gsharp_1.mydialog.Bull.width", 60, "Width");
create Button gsharp_1.mydialog.OK;
create Button gsharp_1.mydialog.Apply;
create Button gsharp_1.mydialog.Cancel;
GuiPopupDialog("gsharp_1.mydialog");
|