public HUDInventory() { InventorySlot.Width = InventorySlot.Size / Engine.Singleton.Camera.AspectRatio; Slots = new InventorySlot[SlotsCount]; for (int i = 0; i < SlotsCount; i++) Slots[i] = new InventorySlot(SlotsSpacing, SlotsSpacing + i * (InventorySlot.Size + SlotsSpacing)); SelectQuad = Engine.Singleton.Labeler.NewSimpleQuad("HighlightMaterial", SlotsSpacing, SlotsSpacing, InventorySlot.Width, InventorySlot.Size, new ColourValue(1, 1, 1), 4); DescriptionBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.2f, 0.5f, 0.6f, 0.45f, ColourValue.White, 1); SelectedPicture = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.21f, 0.58f, 0.3f / Engine.Singleton.Camera.AspectRatio, 0.3f, ColourValue.White, 2); DescriptionLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.03f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); DescriptionLabel.SetPosition(0.45f, 0.51f); GoldBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.7f, 0.1f, 0.2f, 0.1f, new ColourValue(1, 1, 1), 1); GoldLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); GoldLabel.SetPosition(0.71f, 0.13f); InventoryBg = Engine.Singleton.Labeler.NewSimpleQuad("InventoryBgMaterial", 0.01f, 0.01f, 0.98f, 0.98f, new ColourValue(1, 1, 1), 0); CharacterPicture = Engine.Singleton.Labeler.NewSimpleQuad("Default", 0.4f, 0.1f, 0.2f / Engine.Singleton.Camera.AspectRatio, 0.2f, new ColourValue(1, 1, 1), 1); IsVisible = false; }
public HUDNewCharacterStats() { Bg = Engine.Singleton.Labeler.NewSimpleQuad("InventoryBgMaterial", 0.01f, 0.01f, 0.98f, 0.98f, new ColourValue(1, 1, 1), 0); MouseCursor = Engine.Singleton.Labeler.NewSimpleQuad("Kursor", 0.0f, 0.0f, Engine.Singleton.GetFloatFromPxWidth(32), Engine.Singleton.GetFloatFromPxHeight(32), new ColourValue(1, 1, 1), 4); HeaderBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.25f, 0.04f, 0.5f, 0.1f, ColourValue.White, 1); Header = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.08f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); Header.SetPosition(0.4f, 0.06f); Header.Caption = "Statystyki"; ResetBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.8f, 0.85f, 0.09f, 0.06f, ColourValue.White, 1); Reset = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.04f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); Reset.SetPosition(0.81f, 0.86f); Reset.Caption = "RESET"; DownArrow = Engine.Singleton.Labeler.NewSimpleQuad("DownArrow", 0.45f, 0.75f, Engine.Singleton.GetFloatFromPxWidth(64), Engine.Singleton.GetFloatFromPxHeight(128), ColourValue.White, 3); DownArrow.IsVisible = DownArrowEnabled; KwadratyLosu = new KwadratLosu[6]; for (int i = 0; i < 6; i++) { KwadratyLosu[i] = new KwadratLosu(Engine.Singleton.Kostka(2, 10).ToString(), 0.2f, 0.215f + i * 0.1f); } StatyLosu = new StatLosu[6]; StatyLosu[0] = new StatLosu("Walka wrecz", CharStats.WalkaWrecz.ToString(), 0.32f, 0.1f); StatyLosu[1] = new StatLosu("Krzepa", CharStats.Krzepa.ToString(), 0.38f, 0.1f); StatyLosu[2] = new StatLosu("Zrecznosc", CharStats.Zrecznosc.ToString(), 0.44f, 0.1f); StatyLosu[3] = new StatLosu("Charyzma", CharStats.Charyzma.ToString(), 0.5f, 0.1f); StatyLosu[4] = new StatLosu("Opanowanie", CharStats.Opanowanie.ToString(), 0.56f, 0.1f); StatyLosu[5] = new StatLosu("Odpornosc", CharStats.Odpornosc.ToString(), 0.62f, 0.1f); IsVisible = false; }
public HUDInventory() { InventorySlot.Width = InventorySlot.Size / Engine.Singleton.Camera.AspectRatio; Slots = new InventorySlot[SlotsCount]; for (int i = 0; i < SlotsCount; i++) { Slots[i] = new InventorySlot(SlotsSpacing, SlotsSpacing + i * (InventorySlot.Size + SlotsSpacing)); } SelectQuad = Engine.Singleton.Labeler.NewSimpleQuad("HighlightMaterial", SlotsSpacing, SlotsSpacing, InventorySlot.Width, InventorySlot.Size, new ColourValue(1, 1, 1), 4); DescriptionBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.2f, 0.5f, 0.6f, 0.45f, ColourValue.White, 1); SelectedPicture = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.21f, 0.58f, 0.3f / Engine.Singleton.Camera.AspectRatio, 0.3f, ColourValue.White, 2); DescriptionLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.03f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); DescriptionLabel.SetPosition(0.45f, 0.51f); GoldBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.7f, 0.1f, 0.2f, 0.1f, new ColourValue(1, 1, 1), 1); GoldLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); GoldLabel.SetPosition(0.71f, 0.13f); InventoryBg = Engine.Singleton.Labeler.NewSimpleQuad("InventoryBgMaterial", 0.01f, 0.01f, 0.98f, 0.98f, new ColourValue(1, 1, 1), 0); CharacterPicture = Engine.Singleton.Labeler.NewSimpleQuad("Default", 0.4f, 0.1f, 0.2f / Engine.Singleton.Camera.AspectRatio, 0.2f, new ColourValue(1, 1, 1), 1); IsVisible = false; }
public HUDStats() { Stats = new Stat[10]; Stats[0] = new Stat(true, "Walka wrecz", CharStats.WalkaWrecz.ToString(), 0.32f, 0.1f); Stats[1] = new Stat(true, "Krzepa", CharStats.Krzepa.ToString(), 0.38f, 0.1f); Stats[2] = new Stat(true, "Zrecznosc", CharStats.Zrecznosc.ToString(), 0.44f, 0.1f); Stats[3] = new Stat(true, "Zywotnosc", CharStats.Zywotnosc.ToString(), 0.5f, 0.1f); Stats[4] = new Stat(true, "Charyzma", CharStats.Charyzma.ToString(), 0.56f, 0.1f); Stats[5] = new Stat(true, "Opanowanie", CharStats.Opanowanie.ToString(), 0.32f, 0.5f); Stats[6] = new Stat(true, "Odpornosc", CharStats.Odpornosc.ToString(), 0.38f, 0.5f); Stats[7] = new Stat(false, "Wytrzymalosc", CharStats.Wytrzymalosc.ToString(), 0.44f, 0.5f); Stats[8] = new Stat(false, "Sila", CharStats.Sila.ToString(), 0.5f, 0.5f); Stats[9] = new Stat(false, "Ataki", CharStats.Ataki.ToString(), 0.56f, 0.5f); HeaderBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.25f, 0.04f, 0.5f, 0.1f, ColourValue.White, 1); Header = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.08f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); Header.SetPosition(0.4f, 0.06f); Header.Caption = "Statystyki"; ExpBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.25f, 0.2f, 0.5f, 0.06f, ColourValue.White, 2); Exp = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 3); Exp.SetPosition(0.26f, 0.21f); MouseCursor = Engine.Singleton.Labeler.NewSimpleQuad("Kursor", 0.0f, 0.0f, Engine.Singleton.GetFloatFromPxWidth(32), Engine.Singleton.GetFloatFromPxHeight(32), new ColourValue(1, 1, 1), 4); Bg = Engine.Singleton.Labeler.NewSimpleQuad("InventoryBgMaterial", 0.01f, 0.01f, 0.98f, 0.98f, new ColourValue(1, 1, 1), 0); Zmiany = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.04f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); Zmiany.SetPosition(0.42f, 0.71f); Zmiany.Caption = "Zatwierdz zmiany"; ZmianyBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.41f, 0.7f, 0.22f, 0.06f, ColourValue.White, 1); RequiredBg = Engine.Singleton.Labeler.NewSimpleQuad("Black", 0, 0, 0.3f, 0.05f, new ColourValue(1, 1, 1), 3); Required = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 4); IsVisible = false; }
public Stat(bool addAble, String name, String value, float top, float left) { AddAble = addAble; Name = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); Name.Caption = name; Name.SetPosition(left + 0.01f, top + 0.01f); Value = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); Value.Caption = value; Value.SetPosition(left + 0.22f, top + 0.01f); AddPoint = Engine.Singleton.Labeler.NewSimpleQuad("AddPoint", left + 0.29f, top, Engine.Singleton.GetFloatFromPxWidth(32), Engine.Singleton.GetFloatFromPxHeight(32), new ColourValue(1, 1, 1), 1); RemovePoint = Engine.Singleton.Labeler.NewSimpleQuad("RemovePoint", left + 0.3f + Engine.Singleton.GetFloatFromPxWidth(32), top, Engine.Singleton.GetFloatFromPxWidth(32), Engine.Singleton.GetFloatFromPxHeight(32), new ColourValue(1, 1, 1), 1); if (AddAble) { AddPoint.IsVisible = false; RemovePoint.IsVisible = false; } NameBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", left, top, 0.2f, 0.05f, new ColourValue(1, 1, 1), 1); ValueBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", left + 0.21f, top, 0.07f, 0.05f, new ColourValue(1, 1, 1), 1); }
public bool IsOver(SimpleQuad quad) { if (Engine.Singleton.GetFloatFromPxWidth(Engine.Singleton.Mouse.MouseState.X.abs) >= quad.Panel.Left && Engine.Singleton.GetFloatFromPxWidth(Engine.Singleton.Mouse.MouseState.X.abs) <= quad.Panel.Left + quad.Panel.Width && Engine.Singleton.GetFloatFromPxHeight(Engine.Singleton.Mouse.MouseState.Y.abs) >= quad.Panel.Top && Engine.Singleton.GetFloatFromPxHeight(Engine.Singleton.Mouse.MouseState.Y.abs) <= quad.Panel.Top + quad.Panel.Height) { return(true); } return(false); }
public InventorySlot(float left, float top) { BgQuad = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", left, top, Width, Size, new ColourValue(1, 1, 1), 1); Picture = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", left, top, Width, Size, new ColourValue(1, 1, 1), 2); Picture.IsVisible = false; }
public KwadratLosu(String wartosc, float top, float left) { Kwadrat = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", left, top, 0.08f, 0.08f, ColourValue.White, 1); Wartosc = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 4); Wartosc.SetPosition(left + 0.02f, top + 0.01f); Wartosc.Caption = wartosc; CzerwonaPoswiata = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", left - 0.01f, top - 0.01f, 0.1f, 0.1f, ColourValue.Red, 2); }
public Slot(float left, float top) { BgQuad = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", left, top, Width, Size, new ColourValue(1, 1, 1), 1); BlueQuad = Engine.Singleton.Labeler.NewSimpleQuad("HighlightBlueMaterial", left, top, Width, Size, new ColourValue(1, 1, 1), 3); ItemPicture = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", left, top, Width, Size, new ColourValue(1, 1, 1), 2); BlueQuad.IsVisible = false; ItemPicture.IsVisible = false; isSelected = false; }
public SimpleQuad NewSimpleQuad(string materialName, float left, float top, float width, float height, ColourValue colour, int layer) { SimpleQuad quad = new SimpleQuad(GetUniqueLabelName(), materialName, left, top, width, height, colour); Overlays[layer].Add2D(quad.Panel); Quads.Add(quad); return(quad); }
public void Init() { Start_line = 0; Height = 1; Bg = Engine.Singleton.Labeler.NewSimpleQuad("ConsoleMat", 0, 0, 1, 0.5f, ColourValue.ZERO, 3); Textbox = Engine.Singleton.Labeler.NewTextLabel("Console", 0.03f, ColourValue.Black, ColourValue.Black, 4); LogManager.Singleton.DefaultLog.MessageLogged += new LogListener.MessageLoggedHandler(MessageLogged); Initialized = true; }
public HUDMenu() { Menu = Engine.Singleton.Menu; //Options2Choose = new List<TextLabel>(); Options2Choose = new TextLabel[6]; Header = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.1f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); Header.SetPosition(0.4f, 0.3f); MouseCursor = Engine.Singleton.Labeler.NewSimpleQuad("Kursor", 0.0f, 0.0f, Engine.Singleton.GetFloatFromPxWidth(32), Engine.Singleton.GetFloatFromPxHeight(32), new ColourValue(1, 1, 1), 4); BGQuad = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.35f, 0.25f, 0.3f, 0.5f, ColourValue.Black, 1); for (int i = 0; i < 6; i++) { Options2Choose[i] = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.03f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); } }
public HUDShop() { AktywnaStrona = 0; Slot.Width = Slot.Size / Engine.Singleton.Camera.AspectRatio; Slots = new Slot[SlotsCount]; Slots2 = new Slot[SlotsCount]; for (int i = 0; i < SlotsCount; i++) { Slots[i] = new Slot(SlotsSpacing, SlotsSpacing + i * (Slot.Size + SlotsSpacing)); Slots2[i] = new Slot(SlotsSpacing + 0.87f, SlotsSpacing + i * (Slot.Size + SlotsSpacing)); } DescriptionBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.2f, 0.5f, 0.6f, 0.45f, ColourValue.White, 1); SelectedPicture = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.21f, 0.58f, 0.3f / Engine.Singleton.Camera.AspectRatio, 0.3f, ColourValue.White, 2); DescriptionLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.03f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); DescriptionLabel.SetPosition(0.45f, 0.51f); YourGoldBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.2f, 0.2f, 0.2f, 0.08f, ColourValue.White, 1); YourGoldLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.03f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); YourGoldLabel.SetPosition(0.2f, 0.23f); NPCGoldBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.6f, 0.2f, 0.2f, 0.08f, ColourValue.White, 1); NPCGoldLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.03f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); NPCGoldLabel.SetPosition(0.6f, 0.23f); ShopNameBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.25f, 0.04f, 0.5f, 0.1f, ColourValue.White, 1); ShopNameLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.08f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); ShopNameLabel.SetPosition(0.25f, 0.06f); //CompassBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.1f, 0.1f, 0.2f, 0.1f, new ColourValue(1, 1, 1), 1); //CompassLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); //CompassLabel.SetPosition(0.11f, 0.13f); InventoryBg = Engine.Singleton.Labeler.NewSimpleQuad("InventoryBgMaterial", 0.01f, 0.01f, 0.98f, 0.98f, new ColourValue(1, 1, 1), 0); MouseCursor = Engine.Singleton.Labeler.NewSimpleQuad("Kursor", 0.0f, 0.0f, Engine.Singleton.GetFloatFromPxWidth(32), Engine.Singleton.GetFloatFromPxHeight(32), new ColourValue(1, 1, 1), 4); IsVisible = false; KtoraStrona = 0; SelectedOne = -1; //DescriptionLabel.Caption = screenx.ToString(); }
public void Update() { if (Uzyty) { Kwadrat = Kwadrat; } else { Kwadrat = Kwadrat; } if (Zaznaczony) { CzerwonaPoswiata.IsVisible = true; } else { CzerwonaPoswiata.IsVisible = false; } }
public HUD() { LogList = new List <Pair <string, ColourValue> >(8); for (int i = 0; i < 8; i++) { LogList.Add(new Pair <string, ColourValue>("", ColourValue.Black)); } CompassBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.1f, 0.1f, 0.2f, 0.1f, new ColourValue(1, 1, 1), 1); CompassLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); CompassLabel.SetPosition(0.11f, 0.13f); Crosshair = Engine.Singleton.Labeler.NewSimpleQuad("CrosshairMat", Engine.Singleton.GetFloatFromPxWidth(((int)Engine.Singleton.Root.AutoCreatedWindow.Width / 2) - 10), Engine.Singleton.GetFloatFromPxHeight(((int)Engine.Singleton.Root.AutoCreatedWindow.Height / 2) - 10), Engine.Singleton.GetFloatFromPxWidth(20), Engine.Singleton.GetFloatFromPxHeight(20), new ColourValue(1, 1, 1), 2); HPHero = Engine.Singleton.Labeler.NewSimpleQuad("CzerwonyMaterial", 0.05f, 0.05f, 0.1f, 0.05f, new ColourValue(1, 1, 1), 1); HPEnemy = Engine.Singleton.Labeler.NewSimpleQuad("ZoltyMaterial", 0.45f, 0.05f, 0.1f, 0.05f, new ColourValue(1, 1, 1), 1); Log = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.8f, 0.8f, 0.18f, 0.18f, new ColourValue(1, 1, 1), 1); HPHeroLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(1, 0, 0), new ColourValue(1, 0, 0), 2); HPEnemyLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(1, 0, 0), new ColourValue(1, 0, 0), 2); LogLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); LoadScreen = Engine.Singleton.Labeler.NewSimpleQuad("Loading1", 0, 0, 1.0f, 1.0f, ColourValue.White, 4); HPHeroLabel.SetPosition(0.055f, 0.055f); HPEnemyLabel.SetPosition(0.455f, 0.055f); LogLabel.SetPosition(0.82f, 0.82f); LogSlots = new LogSlot[8]; for (int i = 0; i < 8; i++) { LogSlots[i] = new LogSlot(0.81f, 0.81f + i * 0.02f); } IsVisible = false; DrawEnemyHP = false; DrawLog = false; LoadScreen.IsVisible = false; }
public HUD() { LogList = new List<Pair<string, ColourValue>>(8); for (int i = 0; i < 8; i++) { LogList.Add(new Pair<string, ColourValue>("", ColourValue.Black)); } CompassBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.1f, 0.1f, 0.2f, 0.1f, new ColourValue(1, 1, 1), 1); CompassLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); CompassLabel.SetPosition(0.11f, 0.13f); Crosshair = Engine.Singleton.Labeler.NewSimpleQuad("CrosshairMat", Engine.Singleton.GetFloatFromPxWidth(((int)Engine.Singleton.Root.AutoCreatedWindow.Width / 2) - 10), Engine.Singleton.GetFloatFromPxHeight(((int)Engine.Singleton.Root.AutoCreatedWindow.Height / 2) - 10), Engine.Singleton.GetFloatFromPxWidth(20), Engine.Singleton.GetFloatFromPxHeight(20), new ColourValue(1, 1, 1), 2); HPHero = Engine.Singleton.Labeler.NewSimpleQuad("CzerwonyMaterial", 0.05f, 0.05f, 0.1f, 0.05f, new ColourValue(1, 1, 1), 1); HPEnemy = Engine.Singleton.Labeler.NewSimpleQuad("ZoltyMaterial", 0.45f, 0.05f, 0.1f, 0.05f, new ColourValue(1, 1, 1), 1); Log = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.8f, 0.8f, 0.18f, 0.18f, new ColourValue(1, 1, 1), 1); HPHeroLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(1, 0, 0), new ColourValue(1, 0, 0), 2); HPEnemyLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(1, 0, 0), new ColourValue(1, 0, 0), 2); LogLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); LoadScreen = Engine.Singleton.Labeler.NewSimpleQuad("Loading1", 0, 0, 1.0f, 1.0f, ColourValue.White, 4); HPHeroLabel.SetPosition(0.055f, 0.055f); HPEnemyLabel.SetPosition(0.455f, 0.055f); LogLabel.SetPosition(0.82f, 0.82f); LogSlots = new LogSlot[8]; for (int i = 0; i < 8; i++) { LogSlots[i] = new LogSlot(0.81f, 0.81f + i * 0.02f); } IsVisible = false; DrawEnemyHP = false; DrawLog = false; LoadScreen.IsVisible = false; }
public bool IsOverQuad(SimpleQuad quad) { return ((Engine.Singleton.GetFloatFromPxWidth(Engine.Singleton.Mouse.MouseState.X.abs) >= quad.Panel.Left && Engine.Singleton.GetFloatFromPxWidth(Engine.Singleton.Mouse.MouseState.X.abs) <= quad.Panel.Left + quad.Panel.Width && Engine.Singleton.GetFloatFromPxHeight(Engine.Singleton.Mouse.MouseState.Y.abs) >= quad.Panel.Top && Engine.Singleton.GetFloatFromPxHeight(Engine.Singleton.Mouse.MouseState.Y.abs) <= quad.Panel.Top + quad.Panel.Height)); }
public InventorySlot(float left, float top) { BgQuad = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", left, top, Width, Size, new ColourValue(1, 1, 1), 1); Picture = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", left, top, Width, Size, new ColourValue(1, 1, 1), 2); BlueQuad = Engine.Singleton.Labeler.NewSimpleQuad("HighlightBlueMaterial", left, top, Width, Size, new ColourValue(1, 1, 1), 3); Picture.IsVisible = false; BlueQuad.IsVisible = false; }
public void Update() { if (Uzyty) Kwadrat = Kwadrat; else Kwadrat = Kwadrat; if (Zaznaczony) CzerwonaPoswiata.IsVisible = true; else CzerwonaPoswiata.IsVisible = false; }
public StatLosu(String name, String value, float top, float left) { Name = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 4); Name.Caption = name; Name.SetPosition(left + 0.01f, top + 0.01f); Value = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.05f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 4); Value.Caption = value; Value.SetPosition(left + 0.22f, top + 0.01f); AddPoint = Engine.Singleton.Labeler.NewSimpleQuad("AddPoint", left + 0.34f, top, Engine.Singleton.GetFloatFromPxWidth(32), Engine.Singleton.GetFloatFromPxHeight(32), new ColourValue(1, 1, 1), 2); AddPoint.IsVisible = false; NameBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", left, top, 0.2f, 0.05f, new ColourValue(1, 1, 1), 2); ValueBg = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", left + 0.21f, top, 0.12f, 0.05f, new ColourValue(1, 1, 1), 2); }
public HumanController() { TargetLabel = Engine.Singleton.Labeler.NewTextLabel3D("Primitive", 0.04f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 0); ColLabel = Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.04f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2); ColLabel.Caption = "Kolizja"; ColLabel.SetColor(ColourValue.Green, ColourValue.Green); ColLabel.SetPosition(0.4f, 0.1f); TalkBox = Engine.Singleton.Labeler.NewSimpleQuad("QuadMaterial", 0.05f, 0.85f, 0.9f, 0.1f, new ColourValue(1, 1, 1), 1); TalkBox.IsVisible = false; TalkLabels = new List<TextLabel>(); for (int i = 0; i < 8; i++) { TalkLabels.Add(Engine.Singleton.Labeler.NewTextLabel("Primitive", 0.04f, new ColourValue(0.7f, 0.4f, 0), new ColourValue(1, 1.0f, 0.6f), 2)); TalkLabels[i].SetPosition(0.07f, 0.63f + i * 0.037f); } ValidReplies = new List<TalkReply>(); HUDInventory = new HUDInventory(); HUDContainer = new HUDContainer(); HUDShop = new HUDShop(); HUD = new HUD(); HUDMenu = new HUDMenu(); Mysz = new MOIS.MouseState_NativePtr(); light.Type = Light.LightTypes.LT_POINT; light.Direction = new Vector3(0, -1, 0).NormalisedCopy; light.DiffuseColour = new ColourValue(0.2f, 0.2f, 0.8f); light.SpecularColour = new ColourValue(0.3f, 0.3f, 0.9f); // light.SetAttenuation(10.0f, 0, 5.0f, 10.0f); light.PowerScale = 1.0f; l1.Type = Light.LightTypes.LT_POINT; l1.DiffuseColour = new ColourValue(1,0,0); l1.SpecularColour = new ColourValue(1,0,0); l1.PowerScale = 1.0f; l1.Visible = false; l2.Type = Light.LightTypes.LT_POINT; l2.DiffuseColour = new ColourValue(0, 1, 0); l2.SpecularColour = new ColourValue(0, 1, 0); l2.PowerScale = 1.0f; l2.Visible = false; l3.Type = Light.LightTypes.LT_POINT; l3.DiffuseColour = new ColourValue(0, 0, 1); l3.SpecularColour = new ColourValue(0, 0, 1); l3.PowerScale = 1.0f; l3.Visible = false; l4.Type = Light.LightTypes.LT_POINT; l4.DiffuseColour = new ColourValue(1, 1, 0); l4.SpecularColour = new ColourValue(1, 1, 0); l4.PowerScale = 1.0f; l4.Visible = false; l5.Type = Light.LightTypes.LT_POINT; l5.DiffuseColour = new ColourValue(1, 1, 1); l5.SpecularColour = new ColourValue(1, 1, 1); l5.PowerScale = 1.0f; l5.Visible = false; l6.Type = Light.LightTypes.LT_POINT; l6.DiffuseColour = new ColourValue(1, 0, 1); l6.SpecularColour = new ColourValue(1, 0, 1); l6.PowerScale = 1.0f; l6.Visible = false; l7.Type = Light.LightTypes.LT_POINT; l7.DiffuseColour = new ColourValue(0, 1, 1); l7.SpecularColour = new ColourValue(0, 1, 1); l7.PowerScale = 1.0f; l7.Visible = false; }