Category: Objects
/ Menu
Since engine version: 4.6.5.0 CP
(extended in 4.9.5.0 CE)
| Name | Description |
|---|---|
| Ico:Locked | Password icon |
| Ico:League | League icon |
| Ico:GameRunning | Game running icon |
| Ico:Lobby | Lobby icon |
| Ico:RuntimeJoin | Runtime join allowed icon |
| Ico:FairCrew | Fair crew icon |
| Ico:Settlement | Settlement score icon |
idItem, iParameter, bRight[, iValue] with bRight indicating whether the menu entry was selected with [Special2] or the right mouse button. iValue is passed only if bit 8 is set in iExtra and specifies the displayed (overridden) object value of the menu entry./* Wird bei Doppelklick auf Graben aufgerufen */
func Activate()
{
// Lokales Menü mit lokalen Kommandos erzeugen
CreateMenu(GetID());
// Menüeinträge erzeugen
AddMenuItem("Hallo sagen", "SayHello", 0);
AddMenuItem("Zaubern", "DoMagic", 0);
AddMenuItem("Objekt erzeugen: %s", "CreateItem", ROCK);
AddMenuItem("Objekt erzeugen: %s", "CreateItem", FLNT);
}
/* Diese Kommados werden vom Menü aufgerufen */
func SayHello()
{
Message("Hallo",this());
}
func DoMagic()
{
Sound("Magic*");
ObjectCall(CreateObject(MLGT,0,0),"Activate",this());
}
func CreateItem(id item)
{
Sound("Magic*");
CreateContents(item);
}
func Activate(object clonk)
{
// Menü im Clonk mit lokalen Kommandos erzeugen
CreateMenu(GetID(), clonk, this());
// Menüeinträge erzeugen
AddMenuItem(Format("%s Schrumpfen", GetName(clonk)), Format("DoCon(-10,Object(%d))", ObjectNumber(%d)), 0, this(), 0, 0, "Eine Art Jungbrunnen.", 4, clonk);
}