Code:
function GUI_Construction.BuildClicked(_BuildingType)
PlacementState = 0
XGUIEng.UnHighLightGroup("/InGame", "Construction")
if not GUI_Construction.TestSettlerLimit(_BuildingType) then
return
end
local CanPlace, CanNotPlaceString = CanPlaceByCosts(_BuildingType)
if CanPlace == false then
Message(CanNotPlaceString)
else
Sound.FXPlay2DSound( "ui\\menu_select")
GUI.CancelState()
GUI.ActivatePlaceBuildingState(_BuildingType)
XGUIEng.ShowWidget("/Ingame/Root/Normal/PlacementStatus",1)
GUI_Construction.CloseContextSensitiveMenu()
-- save last placement
g_LastPlacedParam = _BuildingType
g_LastPlacedFunction = GUI_Construction.BuildClicked
-- tell the tutorial, that this button has been pressed by the player
if XGUIEng.GetCurrentWidgetID() ~= 0 then
SaveButtonPressed(XGUIEng.GetCurrentWidgetID())
end
end
end
mehr habe ich nicht gefunden...
Lesezeichen