public MenuDisplayer(EditorMenuConfiguration config, WorldSelector selector) { this.config = config; provider = BoundingBoxSelectableProvider.Create(config.Items, getBoundingBox, OnClick); selector.AddProvider(provider); }
public WorldPlacerUpdater(WorldPlacer placer, WorldSelector wSelector) { this.placer = placer; selector = BoundingBoxSelectableProvider.Create ( items: placer.GetItems(), getBoundingBox: placer.GetBoundingBox, onClick: onClick ); wSelector.AddProvider(selector); }
public void Simulate() { updateCameraInfo(); simulateMenu(); selector.UpdateTarget(TW.Data.Get <CameraInfo>().GetCenterScreenRay()); if (TW.Graphics.Mouse.LeftMouseJustPressed) { selector.Select(); } simulateWorldPlacer(); // Less dirty than before, but still dirty selector.ClearProviders(); if (controller.SelectableProvider != null) { selector.AddProvider(controller.SelectableProvider); } selector.RenderSelection(); }