public override void Draw(SpriteBatch spriteBatch) { MediaManager.DrawArt(spriteBatch, "Content/table_clear", 0, 0); MediaManager.DrawArt(spriteBatch, "Content/books_pen", 0, 0); MediaManager.DrawArt(spriteBatch, "Content/implied_partay", 0, 0); MediaManager.DrawArt(spriteBatch, "Content/math", 0, 0); MediaManager.DrawArt(spriteBatch, "Content/lamp", 525, -150); MediaManager.DrawArt(spriteBatch, "Content/splash_screen_paper", 750, 600); foreach (ClickableObject o in menuItems) { o.Draw(spriteBatch); } base.Draw(spriteBatch); MediaManager.DrawArt(spriteBatch, "Content/lamp_light", 0, 0); }
public override void Draw(SpriteBatch spriteBatch) { MediaManager.DrawArt(spriteBatch, "Content/bookstore_background", (int)bgXOffset, 0); MediaManager.DrawArt(spriteBatch, "Content/bookstore_background", (int)bgXOffset + 2000, 0); // player & objects drawn by this! base.Draw(spriteBatch); /* if (direction < 0) * MediaManager.DrawArt(spriteBatch, "Content/shopping_cart_200", (int)600, 425); * else * MediaManager.DrawArt(spriteBatch, "Content/shopping_cart_200_h", (int)400, 425); */ if (grr) { MediaManager.DrawArt(spriteBatch, "Content/BLAH", 200, 40); } }
public override void Draw(SpriteBatch spriteBatch) { spriteBatch.End(); spriteBatch.Begin(); Vector2 mousePos = Vector2.Transform(MediaManager.GetCurMousePos(), MediaManager.cam.get_transformation(game.GraphicsDevice)); /* * if (game.ActiveGame == "TAGAME" || game.ActiveGame == "BOOKSTOREGAME") * { * * Color UI_Color = Color.White; * * int UI_Top_Height = 253; * int UI_Bot_Height = 253; * int UI_Pad_Height = 10; * int UI_Mid_Height = -11; * * int UI_width = 150; * int line_height = 25; * int window_width = 1200; * * int UI_DIST_BW_AS_AND_HID = 20; * int UI_X = window_width - UI_width; * int UI_Y_AS = 5; * int UI_Y_HID = 0; * * int UI_Font_Padding = 10; * int UI_Font_X = UI_Font_Padding + UI_X; * * int DEFAULT_NUM_ITEMS_AS = 2; * int BS_GAME_NUM_ITEMS_AS = 2 + DEFAULT_NUM_ITEMS_AS; * int TA_GAME_NUM_ITEMS_AS = 2 + DEFAULT_NUM_ITEMS_AS; * * int DEFAULT_NUM_ITEMS_NS = 3; * int BS_GAME_NUM_ITEMS_NS = 2 + DEFAULT_NUM_ITEMS_NS; * int TA_GAME_NUM_ITEMS_NS = 2 + DEFAULT_NUM_ITEMS_NS; * * int TA_GAME_HEIGHT_AS = TA_GAME_NUM_ITEMS_AS * line_height + UI_Pad_Height; * int TA_GAME_HEIGHT_NS = TA_GAME_NUM_ITEMS_NS * line_height + 2 * UI_Pad_Height; * int BS_GAME_HEIGHT_AS = BS_GAME_NUM_ITEMS_AS * line_height + UI_Pad_Height; * int BS_GAME_HEIGHT_NS = BS_GAME_NUM_ITEMS_NS * line_height + 2 * UI_Pad_Height; * * if (UI_button_state == 1) * { * foreach (ClickableObject o in menuItems) * { * o.Draw(spriteBatch); * } * } * * * switch (game.ActiveGame) * { * case "TAGAME": * UI_MAX_Y = TA_GAME_HEIGHT_AS; * if (UI_display_state == 1) * { * MediaManager.DrawArt(spriteBatch, "Content/UI_Bottom_150p", UI_X - 50, TA_GAME_HEIGHT_AS + TA_GAME_HEIGHT_NS - UI_Bot_Height); * UI_MAX_Y = TA_GAME_HEIGHT_AS + TA_GAME_HEIGHT_NS; * } * MediaManager.DrawArt(spriteBatch, "Content/UI_Top_150p", UI_X - 50, TA_GAME_HEIGHT_AS - UI_Top_Height); * break; * case "BOOKSTOREGAME": * UI_MAX_Y = BS_GAME_HEIGHT_AS; * if (UI_display_state == 1) * { * MediaManager.DrawArt(spriteBatch, "Content/UI_Bottom_150p", UI_X - 50, BS_GAME_HEIGHT_AS + BS_GAME_HEIGHT_NS - UI_Bot_Height); * UI_MAX_Y = BS_GAME_HEIGHT_AS + BS_GAME_HEIGHT_NS; * } * MediaManager.DrawArt(spriteBatch, "Content/UI_Top_150p", UI_X - 50, BS_GAME_HEIGHT_AS - UI_Top_Height); * break; * default: * break; * } * * MediaManager.DrawText(spriteBatch, "TIME: " + game.time, UI_Font_X, UI_Y_AS, UI_Color); * UI_Y_AS += line_height; * MediaManager.DrawText(spriteBatch, "BSL: " + game.bloodSugarLevel.ToString(), UI_Font_X, UI_Y_AS, UI_Color); * UI_Y_AS += line_height; * * switch (game.ActiveGame) * { * case "TAGAME": * MediaManager.DrawText(spriteBatch, "PAPERS LEFT: ", UI_Font_X, UI_Y_AS, UI_Color); * UI_Y_AS += line_height; * MediaManager.DrawText(spriteBatch, "CLASS PERCENTAGE: ", UI_Font_X, UI_Y_AS, UI_Color); * UI_Y_AS += line_height; * break; * case "BOOKSTOREGAME": * MediaManager.DrawText(spriteBatch, "CUSTOMERS: ", UI_Font_X, UI_Y_AS, UI_Color); * UI_Y_AS += line_height; * MediaManager.DrawText(spriteBatch, "TIME TIL CLOSING: ", UI_Font_X, UI_Y_AS, UI_Color); * UI_Y_AS += line_height; * break; * default: * break; * } * * UI_Y_HID = UI_Y_AS + UI_DIST_BW_AS_AND_HID; * * if (UI_display_state == 1) * { * MediaManager.DrawText(spriteBatch, "SCORE: " + game.score, UI_Font_X, UI_Y_HID, UI_Color); * UI_Y_HID += line_height; * MediaManager.DrawText(spriteBatch, "TIME: " + game.time, UI_Font_X, UI_Y_HID, UI_Color); * UI_Y_HID += line_height; * MediaManager.DrawText(spriteBatch, "GRADE: ", UI_Font_X, UI_Y_HID, UI_Color); * UI_Y_HID += line_height; * * switch (game.ActiveGame) * { * case "TAGAME": * MediaManager.DrawText(spriteBatch, "PAPERS LEFT: ", UI_Font_X, UI_Y_HID, UI_Color); * UI_Y_HID += line_height; * MediaManager.DrawText(spriteBatch, "CLASS PERCENTAGE: ", UI_Font_X, UI_Y_HID, UI_Color); * UI_Y_HID += line_height; * break; * case "BOOKSTOREGAME": * MediaManager.DrawText(spriteBatch, "CUSTOMERS: ", UI_Font_X, UI_Y_HID, UI_Color); * UI_Y_HID += line_height; * MediaManager.DrawText(spriteBatch, "TIME TIL CLOSING: ", UI_Font_X, UI_Y_HID, UI_Color); * UI_Y_HID += line_height; * break; * default: * break; * } * } * * switch (game.ActiveGame) * { * case "TAGAME": * if (UI_display_state == 0) * { * Vector2 newButtonPos = new Vector2(UI_X, TA_GAME_HEIGHT_AS + UI_Mid_Height); * menuItems[0].Position = newButtonPos; * if (UI_button_state == 1) * { * MediaManager.DrawText(spriteBatch, "Click to Expand", UI_X + 22, TA_GAME_HEIGHT_AS + UI_Mid_Height + 14, UI_Color); * } * UI_BUTTON_Y = TA_GAME_HEIGHT_AS + UI_Mid_Height; * } * else if (UI_display_state == 1) * { * Vector2 newButtonPos = new Vector2(UI_X, TA_GAME_HEIGHT_AS + TA_GAME_HEIGHT_NS + UI_Mid_Height); * menuItems[0].Position = newButtonPos; * if (UI_button_state == 1) * { * MediaManager.DrawText(spriteBatch, "Click to Hide", UI_X + 37, TA_GAME_HEIGHT_AS + TA_GAME_HEIGHT_NS + UI_Mid_Height + 14, UI_Color); * } * UI_BUTTON_Y = TA_GAME_HEIGHT_AS + TA_GAME_HEIGHT_NS + UI_Mid_Height; * } * break; * case "BOOKSTOREGAME": * if (UI_display_state == 0) * { * Vector2 newButtonPos = new Vector2(UI_X, BS_GAME_HEIGHT_AS + UI_Mid_Height); * menuItems[0].Position = newButtonPos; * if (UI_button_state == 1) * { * MediaManager.DrawText(spriteBatch, "Click to Expand", UI_X + 22, BS_GAME_HEIGHT_AS + UI_Mid_Height + 14, UI_Color); * } * UI_BUTTON_Y = BS_GAME_HEIGHT_AS + UI_Mid_Height; * } * else if (UI_display_state == 1) * { * Vector2 newButtonPos = new Vector2(UI_X, BS_GAME_HEIGHT_AS + BS_GAME_HEIGHT_NS + UI_Mid_Height); * menuItems[0].Position = newButtonPos; * if (UI_button_state == 1) * { * MediaManager.DrawText(spriteBatch, "Click to Hide", UI_X + 37, BS_GAME_HEIGHT_AS + BS_GAME_HEIGHT_NS + UI_Mid_Height + 14, UI_Color); * } * UI_BUTTON_Y = BS_GAME_HEIGHT_AS + BS_GAME_HEIGHT_NS + UI_Mid_Height; * } * break; * default: * break; * } * UI_BUTTON_X = UI_X; * * } */ MediaManager.DrawArt(spriteBatch, "Content/cursorSmall30", (int)mousePos.X - 30 / 2, (int)mousePos.Y - 30 / 2); spriteBatch.End(); spriteBatch.Begin(SpriteSortMode.Deferred, null, null, null, null, null, MediaManager.cam.get_transformation(spriteBatch.GraphicsDevice)); }