// Update is called once per frame void Update() { //Tell all items that are being built to update themselves GUIEvents.TellItemsToUpdate(Time.deltaTime); if (Input.GetKeyDown("r")) { Resize(); } }
public void Execute() { //Draw Button if (GUI.Button(m_ButtonRect, (ID + 1).ToString(), m_ButtonStyle)) { GUIEvents.QueueButtonPressed(this, ID); } if (Selected) { //Draw Queue Content m_QueueContent.Execute(); } }
public void Execute() { //Draw type button if (GUI.Button(m_ButtonRect, m_Content, m_ButtonStyle)) { GUIEvents.TypeButtonPressed(this, m_ButtonType); } if (Selected) { //Draw Queue Buttons foreach (QueueButton queueButton in m_QueueButtons) { queueButton.Execute(); } } }
protected Texture(String tex, Vec2i pos, Vec2i size, Texture parent, bool isSingleUser, int singleUserID, GUIEvents evts, bool useCreate) : base(pos, isSingleUser, singleUserID, parent) { if (tex == null) { tex = ""; } this.tex = tex; this.size.set(size); this.enabledEvents = evts; if (useCreate) { create(-1); } }
public Texture(int id, String tex, Vec2i position, Vec2i size, Texture parent, GUIEvents evts) : base(id, position) { this.enabledEvents = evts; this.parent = parent; this.size.set(size); Process process = Process.ThisProcess(); view = zCView.Create(process, position.X, position.Y, position.X + this.size.X, position.Y + this.size.Y); if (tex != null && tex != "") { zString text = zString.Create(process, tex); view.InsertBack(text); text.Dispose(); } updateTimer = new Timer(200); updateTimer.OnTick += timerTick; }
public Button(String text, String tex, String font, int x, int y, int width, int height, Texture parent, GUIEvents evts) : this(text, tex, font, x, y, width, height, parent, false, 0, evts) { }
public Button(String text, String tex, GUIEvents evts) : this(text, tex, 0, 0, 1700, 600, evts) { }
public void Read(RakNet.BitStream stream, RakNet.Packet packet, Server server) { int playerID = 0; byte type = 0; stream.Read(out type); stream.Read(out playerID); Player pl = (Player)sWorld.VobDict[playerID]; GuiMessageType gmT = (GuiMessageType)type; int viewID = 0; if (gmT == GuiMessageType.TextBoxCallSend) { String message; stream.Read(out viewID); stream.Read(out message); View v = getViewFromList(viewID); if (!(v is TextBox)) { throw new Exception("TextBoxCallSend needs a TextBox " + v); } TextBox tex = (TextBox)v; TextBox.OnTextSends(tex, (Scripting.Objects.Character.Player)pl.ScriptingNPC, message); } else if (gmT == GuiMessageType.ButtonPressed) { stream.Read(out viewID); View v = getViewFromList(viewID); if (!(v is Button)) { throw new Exception("ButtonPressed needs a Button " + v); } Button button = (Button)v; Button.OnButtonPress(button, (Scripting.Objects.Character.Player)pl.ScriptingNPC); } else if (gmT == GuiMessageType.GuiEvent) { int guiEvent = 0; stream.Read(out viewID); stream.Read(out guiEvent); GUIEvents evt = (GUIEvents)guiEvent; View v = getViewFromList(viewID); if (evt.HasFlag(GUIEvents.LeftClicked)) { if ((v is Button)) { Button button = (Button)v; Button.OnButtonPress(button, (Scripting.Objects.Character.Player)pl.ScriptingNPC); } Texture tex = (Texture)v; Texture.isOnLeftClick(tex, (Scripting.Objects.Character.Player)pl.ScriptingNPC); } else if (evt.HasFlag(GUIEvents.RightClicked)) { Texture.isOnRightClick((Texture)v, (Scripting.Objects.Character.Player)pl.ScriptingNPC); } else if (evt.HasFlag(GUIEvents.Hover)) { bool hover = false; stream.Read(out hover); Texture.isOnHover((Texture)v, (Scripting.Objects.Character.Player)pl.ScriptingNPC, hover); } else if (evt.HasFlag(GUIEvents.ListButtonClicked)) { Scripting.GUI.GuiList.ListButton.isOnClick((Scripting.GUI.GuiList.ListButton)v, (Scripting.Objects.Character.Player)pl.ScriptingNPC); //Texture.isOnHover((Texture)v, (Scripting.Objects.Character.Player)pl.ScriptingNPC, hover); } else if (evt.HasFlag(GUIEvents.ListTextBoxSend)) { String text = ""; stream.Read(out text); Scripting.GUI.GuiList.ListTextBox.isOnTextSend((Scripting.GUI.GuiList.ListTextBox)v, (Scripting.Objects.Character.Player)pl.ScriptingNPC, text); //Texture.isOnHover((Texture)v, (Scripting.Objects.Character.Player)pl.ScriptingNPC, hover); } } }
public Button(String text, Vec2i pos, GUIEvents evts) : this(text, pos.X, pos.Y, evts) { }
public Button(String text, int x, int y, GUIEvents evts) : this(text, "buttons_03.tga", x, y, 1700, 600, evts) { }
public Button(String text, String tex, String font, ColorRGBA color, Vec2i pos, Vec2i size, Texture parent, GUIEvents evts, bool isSingleUser, int singleUserID) : base(tex, pos, size, parent, isSingleUser, singleUserID, evts, false) { this.text = text; this.font = font; this.color = color; create(-1); }
public Button(String text, GUIEvents evts) : this(text, "buttons_03.tga", evts) { }
public Texture(String tex, GUIEvents evts) : this(tex, 0, 0, 0x2000, 0x2000, evts) { }
public Button(String text, String tex, String font, ColorRGBA color, Vec2i pos, Vec2i size, Texture parent, bool isSingleUser, int singleUserID, GUIEvents evts) : this(text, tex, "FONT_DEFAULT.TGA", ColorRGBA.White, pos, size, parent, evts, isSingleUser, singleUserID) { }
public Texture(String tex, int x, int y, int width, int height, Texture parent, GUIEvents evts) : this(tex, x, y, width, height, parent, false, 0, evts) { }
public Button(String text, String tex, int x, int y, int width, int height, GUIEvents evts) : this(text, tex, x, y, width, height, null, false, 0, evts) { }
public Texture(String tex, int x, int y, int width, int height, Texture parent, bool isSingleUser, int singleUserID, GUIEvents evts) : this(tex, new Vec2i(x, y), new Vec2i(width, height), parent, isSingleUser, singleUserID, evts) { }
public List(int id, int lines, String font, Vec2i pos, Vec2i size, String texture, Texture parent, GUIEvents evts) : base(id, texture, pos, size, parent, evts) { //Creation: Process process = Process.ThisProcess(); setFont(font); emptyString = zString.Create(process, ""); createTextViews(lines); }
public Texture(String tex, Vec2i pos, Vec2i size, Texture parent, bool isSingleUser, int singleUserID, GUIEvents evts) : this(tex, pos, size, parent, isSingleUser, singleUserID, evts, true) { }
public Button(String text, String tex, int x, int y, int width, int height, Texture parent, bool isSingleUser, int singleUserID, GUIEvents evts) : this(text, tex, "FONT_DEFAULT.TGA", ColorRGBA.White, new Vec2i(x, y), new Vec2i(width, height), parent, isSingleUser, singleUserID, evts) { }
public Button(int id, String text, String tex, String font, ColorRGBA color, Vec2i position, Vec2i size, Texture parent, GUIEvents evts) : base(id, tex, position, size, parent, evts) { setFont(font); setText(text); setColor(color); }