rendered paste bodyIn MainMenuGui:
new GuiButtonCtrl() {
canSaveDynamicFields = "0";
Profile = "GuiButtonProfile";
HorizSizing = "left";
VertSizing = "top";
position = "712 509";
Extent = "73 20";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "loadIntroVideo();";
hovertime = "1000";
offset = "10 10";
text = "Button title";
groupNum = "-1";
buttonType = "PushButton";
};
Some script:
function loadIntroVideo()
{
alxStop($musicHandle);
exec("gamebase/client/ui/video_guis/VideoTest.gui");
Canvas.pushDialog("VideoTest");
theo.setFile("gamebase/data/video/lets_dance.ogg");
}
function stopIntroVideo()
{
theo.stop();
Canvas.popDialog("VideoTest");
loadMainMenu();
}
VideoTest.gui:
//--- OBJECT WRITE BEGIN ---
new GuiControl(VideoTest) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = "800 600";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
CloseCommand = "stopIntroVideo();";
new GuiButtonCtrl(VideoTestButton) {
canSaveDynamicFields = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "top";
Position = "29 285";
Extent = "110 20";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "stopIntroVideo();";
hovertime = "1000";
text = "Stop that shit!";
groupNum = "-1";
buttonType = "PushButton";
accelerator = "escape";
};
new GuiTheoraCtrl(theo) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "169 81";
Extent = "600 450";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
done = "0";
stopOnSleep = "0";
backgroundColor = "0 0 0 255";
};
};
//--- OBJECT WRITE END ---