void renderPlayerRoot(Blitter b) { Character c = (mainMenuNavigator.submenuAt(0) as CharacterMenu).character; b.PushWindow(); wr.render(b, new Rectangle(0, 0, 200, 66), WindowRenderer.Mode.Light); cabedge.font_v3_2_black.Render(b, 25, 12, c.name); cabedge.font_v3_1_black.Render(b, 25, 32, string.Format("{0} / {1}", c.hp, c.baseStats.mhp + c.bonusStats.mhp)); cabedge.font_v3_1_black.Render(b, 25, 42, c.classname); Image portrait = c.getPortrait(); if(portrait != null) b.Blit(portrait, 160, 10); b.PopWindow(); }
void renderEnhancementsMenu(Blitter b) { //render the tooltip Enhancement selEnh = null; if(mainMenuNavigator.submenuAt(2) != null) selEnh = (mainMenuNavigator.submenuAt(2) as EnhancementSubMenu).enh; if(selEnh != null) { b.PushWindow(); int targetWidth = 140; V3Sysfont.StringLayoutInfo sli = cabedge.font_v3_1_black.layoutRectangle(targetWidth-25, -1, selEnh.tooltip); b.OffsetWindow(140+1, 33 + locateSubmenu(b.window, mainMenuNavigator.selectionAt(2), 16, sli.size.Height + 20)); wr.render(b, new Rectangle(0, 0, 25+sli.size.Width+10, 10+sli.size.Height+10), WindowRenderer.Mode.Light); cabedge.font_v3_1_black.renderLayout(b, 25, 10, sli); b.PopWindow(); } b.PushWindow(); wr.render(b, new Rectangle(0, 0, 140, 33), WindowRenderer.Mode.Light); cabedge.font_v3_2_black.Render(b, 25, 10, "Equipped"); b.OffsetWindow(0, 33); renderItemList(b, partyRoot.enhancements.items, mainMenuNavigator.selectionAt(2), selEnh != null, 130); b.PopWindow(); }
void renderPartyRoot(Blitter b, bool selActive) { b.PushWindow(); wr.render(b, new Rectangle(0, 0, 200, 66), WindowRenderer.Mode.Light); cabedge.font_v3_2_black.Render(b, 25, 15, "XP"); cabedge.font_v3_2_black.Render(b, 25, 35, "GP"); cabedge.font_v3_2_black.Render(b, 55, 15, string.Format("{0}/{1}",cabedge.party.xp,cabedge.party.xpt)); cabedge.font_v3_2_black.Render(b, 55, 35, cabedge.party.gp.ToString()); cabedge.font_v3_1_black.RenderRight(b, 192, 10, "Level"); cabedge.font_v3_3_black.RenderRight(b, 192, 20, cabedge.party.level.ToString()); b.OffsetWindow(0,66); renderItemList(b, partyRoot.items, mainMenuNavigator.selectionAt(1), selActive, 190); b.PopWindow(); }
public void renderMainMenu(Blitter b) { //title safe area offsets int mxofs = 20; int myofs = 20; int listwidth = 100; int rootMenuHeight = 66; listwidth++; //leave a gap before the next menus //title safe area b.ApplyWindow(mxofs, myofs, 640-mxofs*2, 480-myofs*2); //identify location of root menu int rootMenuVertOfs = locateSubmenu(b.window, mainMenuNavigator.selectionAt(0), 22, rootMenuHeight); //top-level party menu if(mainMenuNavigator.submenuAt(0) is PartyRootMenu) { b.PushWindow(); b.OffsetWindow(listwidth, rootMenuVertOfs); bool selectionA = false; //if(mainMenuNavigator.menuAt(2) != null) { if(mainMenuNavigator.selectionAt(1) == 1) { selectionA = true; int submenuOffset = 200+1; b.PushWindow(); b.OffsetWindow(submenuOffset, rootMenuHeight + locateSubmenu(b.window, mainMenuNavigator.selectionAt(1), 16, 33)); renderEnhancementsMenu(b); b.PopWindow(); } renderPartyRoot(b, selectionA); b.PopWindow(); } else { b.PushWindow(); b.OffsetWindow(listwidth, rootMenuVertOfs); renderPlayerRoot(b); b.PopWindow(); } //-------------- //main list //party item in main list if(mainMenuNavigator.submenuAt(0) is PartyRootMenu) wr.render(b, new Rectangle(0, 0, 100+SelectionOverhang, 22), WindowRenderer.Mode.BigSelected); else wr.render(b, new Rectangle(0, 0, 100, 22), WindowRenderer.Mode.Medium); string partyText = string.Format("P A R T Y Lv. {0}",cabedge.party.level); cabedge.font_v3_1_black.Render(b, 7, 8, partyText); int level = Lib.TimerSin((int)DateTime.Now.Ticks, 12000, 8) + 8; int yofs = 22; for(int i=0;i<cabedge.party.chars.Count;i++) { clr.render(b, new Point(0, yofs), i+1==mainMenuNavigator.selectionAt(0), level, cabedge.party.chars[i].name); yofs+=22; } b.PopWindow(); //---------------- }