private void ActivateLevel() { if (currentlyActiveLevel != null) { currentlyActiveLevel.ItemsChanged -= OnItemsChanged; } currentlyActiveLevel = levelStack.Peek(); currentlyActiveLevel.ItemsChanged += OnItemsChanged; y = 0.5f; selectedItemIdx = 0; RefreshItems(); }
public SubLevelMenuItem(string label, IMenuLevel level) { Label = label; Level = level; }
public MenuModel(IMenuLevel rootLevel) { levelStack.Push(rootLevel); ActivateLevel(); }
public Menu(Device device, ShaderCache shaderCache, TrackedDeviceBufferManager trackedDeviceBufferManager, ControllerManager controllerManager, IMenuLevel rootLevel) { model = new MenuModel(rootLevel); controller = new MenuController(model, controllerManager); visualRenderer = new MenuView(device, model); renderer = new MenuRenderer(device, shaderCache, trackedDeviceBufferManager, controllerManager, visualRenderer.TextureView); }