public LobbyState(IGameStateService gameStateService, IGuiService guiService, IInputService inputService, GraphicsDeviceManager graphics, ContentManager content, String username) { allRoom = Game1.main_console.ListRooms(); this.gameStateService = gameStateService; this.guiService = guiService; this.inputService = inputService; this.graphics = graphics; this.content = content; this.username = username; this.page = 0; roomIDLabels = new List<LabelControl>(); roomCapLabels = new List<LabelControl>(); joinButtons = new List<ButtonControl>(); panelVisibility = new List<bool>(); joinEventHandlers = new List<EventHandler>(); this.mouseMove = new MouseMoveDelegate(mouseMoved); lobbyScreen = new Screen(1194, 692); /*mainMenuScreen.Desktop.Bounds = new UniRectangle( new UniScalar(0.1f, 0.0f), new UniScalar(0.1f, 0.0f), // x and y = 10% new UniScalar(0.8f, 0.0f), new UniScalar(0.8f, 0.0f) // width and height = 80% );*/ spriteBatch = new SpriteBatch(graphics.GraphicsDevice); LoadContent(lobbyScreen, content); }
public RoomState(IGameState previousState, IGameStateService gameStateService, IGuiService guiService, IInputService inputService, GraphicsDeviceManager graphics, ContentManager content) { this.gameStateService = gameStateService; this.guiService = guiService; this.inputService = inputService; this.graphics = graphics; this.content = content; this.previousState = previousState; this.mouseMove = new MouseMoveDelegate(mouseMoved); this.teamA = new List<Peer>(); this.teamB = new List<Peer>(); playerIDLabels = new List<LabelControl>(); panelVisibility = new List<bool>(); roomScreen = new Screen(1184, 682); Game1.main_console.StartEvent += Start; spriteBatch = new SpriteBatch(graphics.GraphicsDevice); LoadContent(roomScreen, content); }
static CallbackHandler() { mouseButtonDownCB = new MouseButtonDownDelegate(fireButtonDown); mouseButtonUpCB = new MouseButtonUpDelegate(fireButtonUp); mouseMoveCB = new MouseMoveDelegate(fireMoved); mouseWheelCB = new MouseWheelDelegate(fireWheel); }
public MainMenuState(IGameStateService gameStateService, IGuiService guiService, IInputService inputService, GraphicsDeviceManager graphics, ContentManager content) { this.gameStateService = gameStateService; this.guiService = guiService; this.inputService = inputService; this.graphics = graphics; this.content = content; this.mouseMove = new MouseMoveDelegate(mouseMoved); this.keyHit = new KeyDelegate(keyboardEntered); mainMenuScreen = new Screen(349, 133); /*mainMenuScreen.Desktop.Bounds = new UniRectangle( new UniScalar(0.1f, 0.0f), new UniScalar(0.1f, 0.0f), // x and y = 10% new UniScalar(0.8f, 0.0f), new UniScalar(0.8f, 0.0f) // width and height = 80% );*/ spriteBatch = new SpriteBatch(graphics.GraphicsDevice); LoadContent(mainMenuScreen, content); }
public CreateRoomState(IGameStateService gameStateService, IGuiService guiService, IInputService inputService, GraphicsDeviceManager graphics, ContentManager content) { this.gameStateService = gameStateService; this.guiService = guiService; this.inputService = inputService; this.graphics = graphics; this.content = content; this.previousState = gameStateService.ActiveState; this.mouseMove = new MouseMoveDelegate(mouseMoved); createRoomScreen = new Screen(458, 274); /*mainMenuScreen.Desktop.Bounds = new UniRectangle( new UniScalar(0.1f, 0.0f), new UniScalar(0.1f, 0.0f), // x and y = 10% new UniScalar(0.8f, 0.0f), new UniScalar(0.8f, 0.0f) // width and height = 80% );*/ spriteBatch = new SpriteBatch(graphics.GraphicsDevice); LoadContent(createRoomScreen, content); }
private static extern IntPtr NativeMouse_new(IntPtr osWindow, MouseButtonDownDelegate mouseButtonDownCB, MouseButtonUpDelegate mouseButtonUpCB, MouseMoveDelegate mouseMoveCB, MouseWheelDelegate mouseWheelCB #if FULL_AOT_COMPILE , IntPtr instanceHandle #endif );