About the studio activation
Posted: Thu Jun 28, 2012 11:04 am
So I've been looking around in the base.x file of army men rts, and I found this code which included 3 buttons - Load, Safe load, and Cancel
I'm not an expert in all of this but isn't it suppose to be ''Studio'' and not ''Cancel''? If so, you can see there is no command in the ''Cancel'' button which orders to start something.
I'm not an expert in all of this but isn't it suppose to be ''Studio'' and not ''Cancel''? If so, you can see there is no command in the ''Cancel'' button which orders to start something.
Code: Select all
CreateControl("StudioTool::MissionLoad", "MissionSelection")
{
Text("Load Mission");
Style("MissionSelect", "ShowHidden");
CreateControl("Menu", "Menu")
{
Geometry("Bottom", "Right");
Pos(-5, -5);
Style("Horizontal", "NoAutoSize", "!DropShadow", "Transparent");
MenuEdge(0);
ItemConfig()
{
ReadTemplate("Std::Button");
Font("System");
Size(80, 25);
}
AddItem("Load")
{
OnEvent("Button::Notify::Pressed")
{
SendNotifyEvent("<<", "Game::MissionSelection::Message::Select");
Deactivate("<<");
Cmd("sys.runcode studio");
}
}
AddItem("SafeLoad")
{
OnEvent("Button::Notify::Pressed")
{
Cmd("gamegod.dosafeload");
SendNotifyEvent("<<", "Game::MissionSelection::Message::Select");
Deactivate("<<");
Cmd("sys.runcode studio");
}
}
AddItem("Cancel")
{
OnEvent("Button::Notify::Pressed")
{
Deactivate("<<");
}
}
}