Beispiel #1
0
        public override bool ProcessMouse(SadConsole.Input.MouseConsoleState state)
        {
            // Check the scroll bar for mouse info first. If mouse not handled by scroll bar, then..

            // Create a mouse state based on the controlsContainer
            if (!controlsContainer.ProcessMouse(new SadConsole.Input.MouseConsoleState(controlsContainer, state.Mouse)))
            {
                // Process this console normally.
                return(mainConsole.ProcessMouse(state));
            }

            // If we get here, then the mouse was over the scroll bar.
            return(true);
        }
        public override bool ProcessMouse(MouseConsoleState state)
        {
            // Create a new temp state based on the our "behind the scenes" console that holds the scroll bar
            var stateForScroll = new MouseConsoleState(controlsContainer, state.Mouse);

            // Check if this state, based on the console holding the scroll bar
            if (stateForScroll.IsOnConsole)
            {
                controlsContainer.ProcessMouse(stateForScroll);
                return(true);
            }

            // if we're here, process the mouse like normal.
            return(base.ProcessMouse(state));
        }