Пример #1
0
    private void ActivateLevel()
    {
        if (currentlyActiveLevel != null)
        {
            currentlyActiveLevel.ItemsChanged -= OnItemsChanged;
        }
        currentlyActiveLevel = levelStack.Peek();
        currentlyActiveLevel.ItemsChanged += OnItemsChanged;

        y = 0.5f;
        selectedItemIdx = 0;

        RefreshItems();
    }
Пример #2
0
 public SubLevelMenuItem(string label, IMenuLevel level)
 {
     Label = label;
     Level = level;
 }
Пример #3
0
 public MenuModel(IMenuLevel rootLevel)
 {
     levelStack.Push(rootLevel);
     ActivateLevel();
 }
Пример #4
0
 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);
 }