private static void UpdateMapGui(GuiComposer composer, Vec3d pos) { var map = (GuiElementMap)composer.GetElement("mapElem"); map.CurrentBlockViewBounds.X1 = pos.X - map.Bounds.InnerWidth / 2.0 / map.ZoomLevel; map.CurrentBlockViewBounds.Z1 = pos.Z - map.Bounds.InnerHeight / 2.0 / map.ZoomLevel; map.CurrentBlockViewBounds.X2 = pos.X + map.Bounds.InnerWidth / 2.0 / map.ZoomLevel; map.CurrentBlockViewBounds.Z2 = pos.Z + map.Bounds.InnerHeight / 2.0 / map.ZoomLevel; map.EnsureMapFullyLoaded(); }
public static GuiElementFlatList GetFlatList(this GuiComposer composer, string key) { return((GuiElementFlatList)composer.GetElement(key)); }