public void RemoveItem(GUIItem item) { if (item.AccessIndex >= 0) { guiElements.Remove(item.AccessIndex); } }
public void UpdateContainer() { GUIItem[] containerItems = new GUIItem[] { null }; if (shopType == ShopType.WEAPON) { containerItems = CanvasScript.instance.NPCPanel.GetComponent <UIPanels>().itemHolders; for (int i = 0; i < 28; ++i) { containerItems[i].SetItem(null); } } else if (shopType == ShopType.POTION) { containerItems = CanvasScript.instance.potionPanel.GetComponent <UIPanels>().itemHolders; for (int i = 0; i < 6; ++i) { containerItems[i].SetItem(null); } } else if (shopType == ShopType.ARMOR) { containerItems = CanvasScript.instance.NPCArmorPanel.GetComponent <UIPanels>().itemHolders; for (int i = 0; i < 28; ++i) { containerItems[i].SetItem(null); } } for (int i = 0; i < items.Count; ++i) { containerItems[i].SetItem(items[i]); } }
public void ProgressBarDlg() { gui.InitDialog(false, false); int W = D3DDevice.Instance.Width; int H = D3DDevice.Instance.Height; int x0 = -20; int y0 = 100; int dy = 350; int dx = W + 50; GUIItem frame = gui.InsertFrame("Cargando mision", x0, y0, dx, dy, Color.FromArgb(240, 240, 240), frameBorder.sin_borde); frame.c_font = Color.FromArgb(0, 0, 0); progress_bar = gui.InsertProgressBar(ID_PROGRESS1, 50, y0 + 150, W - 100, 60); Device d3dDevice = D3DDevice.Instance.Device; int cant_textures = 5; progress_bar.SetRange(0, cant_textures, "Descargando archivos.."); progress_bar.SetPos(1); for (int i = 0; i < cant_textures; ++i) { progress_bar.SetPos(i); progress_bar.text = "Descargando archivo: " + MediaDir + "Texturas\\f1\\f1piso2.png"; Texture textura_piso = Texture.FromBitmap(d3dDevice, (Bitmap)Bitmap.FromFile(MediaDir + "Texturas\\f1\\f1piso2.png"), Usage.None, Pool.Managed); textura_piso.Dispose(); MessageLoop(); } gui.EndDialog(); // progress bar dialog }
private GUIItem AddNewTaskItem(WinHandle window) { window.TitleChanged += Window_TitleChanged; var g = new GUIItem(); Application.Current.Dispatcher.Invoke(() => { try { MenuItem s = new MenuItem(); s.Click += (object sender, RoutedEventArgs e) => { window.MaximizeMinimize(); }; s.Header = window.Title; s.Tag = window.Ptr.ToString(); Image m = new Image(); var handle = window.WindowIcon.ToBitmap().GetHbitmap(); try { m.Source = Imaging.CreateBitmapSourceFromHBitmap(handle, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); s.Icon = m; } finally { InteropHelper.DeleteObject(handle); } g.Destroy = () => { Application.Current.Dispatcher.Invoke(() => ProcMenu.Items.Remove(ProcMenu.Items.Cast<MenuItem>().Where(x => x.Tag == s.Tag).First())); }; ProcMenu.Items.Add(s); } catch { } }); return g; }
//////////////////////////////////////////////////////// public void AddItem(GUIItem item) { if (item.AccessIndex >= 0) { guiElements.Add(item.AccessIndex, item); } }
private void ResBtn_Clicked(GUIItem item) { Button btn = item as Button; Group costGroup = btn.Tag as Group; String cost_name = costGroup.Tag as String; MouseUI mUI = _Manager.GetComponent <MouseUI>()._ModGet_Manager().GetComponent <MouseUI>(); EntityCost cost = Costs.GetEntityCost(cost_name); foreach (GUIItem costItem in costGroup.Items) { TextField txt = null; if (costItem is TextField) { txt = costItem as TextField; } else if (costItem is Group) { foreach (GUIItem gItem in ((Group)costItem).Items) { if (gItem is TextField) { txt = gItem as TextField; break; } } } if (txt != null) { String resource = txt.Tag as String; int val; if (int.TryParse(txt.Text, out val)) { Debug.Log("Setting " + resource + " of " + cost_name + " to " + val); cost.SetCost(resource, val); } else { txt.Text = cost.GetCost(resource).ToString(); Debug.Log("Failed to set " + resource + " of " + cost_name + ": Not a Number"); } } } Costs.SetEntityCost(cost); if (mUI != null) { mUI.updateBuildInfomation("ButtonBuild" + cost.Internal_Name); } ManagerResources res = _Manager.GetComponent <ManagerResources>(); if (res != null && res._ModGet_TileMap() != null) { res.updateResourcePanel(res._ModGet_TileMap()); } }
public void Replace(GUIItem it, int r, int c) { if (c < cols && r < rows.Length && allChildren[r, c] != null) { rows[r].children[c] = it; } return; }
private void toolbox_SelectedIndexChanged(object sender, EventArgs e) { if (selectedItem != null) { selectedItem.Selected = false; selectedItem = null; } }
private GUIItem AddNewNotification(NOTIFYITEMICON icon) { var g = new GUIItem(); Application.Current.Dispatcher.Invoke(() => { var obj = new TrayIcon(icon); NotifyiconHolder.Children.Add(obj); g.Destroy = () => { Application.Current.Dispatcher.Invoke(() => NotifyiconHolder.Children.Remove(obj)); }; }); return g; }
private GUIItem AddNewTaskItem(WinHandle window) { var g = new GUIItem(); Application.Current.Dispatcher.Invoke(() => { TaskItem tsk = new TaskItem(window, taskItemHeight); Tasks.Children.Add(tsk); g.Destroy = () => { Application.Current.Dispatcher.Invoke(() => Tasks.Children.Remove(tsk)); }; }); return(g); }
private void NoMouse() { if (newItem != null) { if (newItem is GUIContainer) { container = (GUIContainer)newItem; } activeControlsList.Items.Add(newItem); newItem = null; } }
public override void Add(GUIItem it) { for (int i = 0; i < rows.Length; i++) { for (int j = 0; j < cols; j++) { if (allChildren[i, j] == null) { allChildren[i, j] = it; return; } } } }
private void activeControlsList_SelectedIndexChanged(object sender, EventArgs e) { if (activeControlsList.SelectedItem == null) { return; } if (selectedItem != null) { selectedItem.Selected = false; selectedItem = null; } propertyGrid1.SelectedObject = selectedItem = ((GUIItem)activeControlsList.SelectedItem); selectedItem.Selected = true; canvas.Invalidate(); }
public void Configurar() { gui.InitDialog(false, false); profiling = true; int W = D3DDevice.Instance.Width; int H = D3DDevice.Instance.Height; int x0 = 50; int y0 = 50; int dy = H - 100; int dx = W - 100; GUIItem frame = gui.InsertIFrame("Profiling", x0, y0, dx, dy, Color.FromArgb(140, 240, 140)); frame.c_font = Color.FromArgb(0, 0, 0); gui.InsertButton(IDOK, "OK", x0 + dx - 300, y0 + dy - 60, 120, 60); gui.InsertButton(IDCANCEL, "Salir", x0 + dx - 140, y0 + dy - 60, 120, 60); gui.InsertItem("Configure el color", x0 + 50, y0 + 130); int cdx = 50; int pos_x = x0 + 100; int pos_y = y0 + 220; int s = 0; for (int i = 0; i < cant_colores; ++i) { GUIItem item = gui.InsertItemColor(pos_x, pos_y, lst_colores[i], i); if ((i + 1) % 4 == 0) { if (s % 2 == 1) { pos_x = x0 + 100; } else { pos_x = x0 + 100 - 38; } pos_y += cdx / 2; s++; } else { pos_x += cdx + cdx / 2; } // uso el texto para meter el dato del nro de color item.text = "" + i; } }
private void RightMouse() { if (selectedItem != null) { selectedItem.Selected = false; selectedItem = null; } for (int i = activeControlsList.Items.Count - 1; i >= 0; i--) { if (((GUIItem)activeControlsList.Items[i]).IsPointOnItem(mouseX, mouseY)) { selectedItem = ((GUIItem)activeControlsList.Items[i]); selectedItem.Selected = true; break; } } }
//////////////////////////////////////////////////////// public void FocusIndex(int go) { if (guiElements.Count == 0) { Debug.LogWarning("No gui elements present to focus!"); return; } if (go > 0) { ++currentAccessIndex; currentAccessIndex = currentAccessIndex % guiElements.Count; } else if (go < 0) { --currentAccessIndex; if (currentAccessIndex < 0) { currentAccessIndex = guiElements.Count - 1; } else { currentAccessIndex = (currentAccessIndex % guiElements.Count); } } else { currentAccessIndex = 0; } GUIItem lastFocus = focus; DoFocus(); if (lastFocus != null) { lastFocus.OnUnfocused(); } if (focus != null) { focus.OnFocused(); } }
void Start() { //Adds GUI messages to list if (!GameManager.Instance.enableSeebright) { _currentMessageItem = new GUIItem((float)(ScreenUtil.ScreenWidth / 2), (float)(ScreenUtil.ScreenHeight / 2), MOVEMENT, GUIManager.Instance.defaultStyle, MOVEMENT_TUT_DURATION); } else { _currentMessageItem = new GUIItem((float)(ScreenUtil.ScreenWidth / 2), (float)(ScreenUtil.ScreenHeight / 2), MOVEMENT, style, MOVEMENT_TUT_DURATION); } messages = new List <string>(); messages.Add(MOVEMENT); messages.Add(PAWN); messages.Add(SWIRLIE_SPIKES); messages.Add(CONFETTI); GUIManager.Instance.addGUIItem(_currentMessageItem); }
private void DrawIFrame() { int W = D3DDevice.Instance.Width; int H = D3DDevice.Instance.Height; int dy = H - 50; int dy2 = dy; int dx = W / 2; int posEnX = (W / 2) - (dx / 2); int posEnY = (H / 2) - (dy / 2); int x0 = posEnX + 150; int y0 = posEnY + 100; int x1 = x0; int y1 = y0; GUIItem frame = gui.InsertIFrame("", posEnX, posEnY, dx, dy, Color.FromArgb(96, 78, 130)); frame.c_font = Color.FromArgb(0, 0, 0); frame.scrolleable = true; }
// Use this for initialization void Start() { bodyRigidbody = GetComponent <Rigidbody2D> (); cldr = GetComponent <BoxCollider2D> (); /*itemDetector = this.GetComponentInChildren<InteractionDetector> (); * if (itemDetector == null) { * throw new MissingComponentException("No interaction detector set"); * } * itemContainer = GetComponent<ItemContainerScript> ();*/ //playerUI = GetComponent <GUI> (); intManager = transform.GetComponent <InteractionManager> (); if (intManager == null) { throw new UnityException("No GUI Manager found for player"); } guiItems = intManager.GetGuiItems(); leftHand = guiItems["left hand"]; rightHand = guiItems["right hand"]; }
private void CreateInterface() { GUIItem guiText = new GUIItem(); int W = D3DDevice.Instance.Width; int H = D3DDevice.Instance.Height; int dy = H - 50; int dy2 = dy; int dx = W / 2; int posEnX = (W / 2) - (dx / 2); int posEnY = (H / 2) - (dy / 2); int x0 = posEnX + 150; int y0 = posEnY + 100; int x1 = x0; int y1 = y0; DrawIFrame(); shipHelmGuiItem = gui.InsertImage("timon.jpg", x1, y1 + 30, MediaDir); shipHelmGuiItemText = gui.InsertItem("Timon", x1 += 50, y1 + 20); shipHelmGuiItemButton = gui.InsertButton(ID_CRAFT_SHIP_HELM, "Crear", x1 += 300, y1, 120, 60); noelementsMsg.Text = "No tienes elementos suficientes"; noelementsMsg.Color = Color.Red; noelementsMsg.Align = TgcText2D.TextAlign.RIGHT; noelementsMsg.Position = new Point((W / 2) - 180, (H / 2) - 5); noelementsMsg.Size = new Size(300, 100); noelementsMsg.changeFont(new Font("TimesNewRoman", 14)); craftElementMsg.Text = "Creaste un timon. Revisa el inventario"; craftElementMsg.Color = Color.Green; craftElementMsg.Align = TgcText2D.TextAlign.RIGHT; craftElementMsg.Position = new Point((W / 2) - 180, (H / 2) - 5); craftElementMsg.Size = new Size(300, 100); craftElementMsg.changeFont(new Font("TimesNewRoman", 14)); }
void Update() { //Returns back to Main menu when tutorial is over if (_tutorialOver) { if (Time.time > _startTime + GAME_END_DURATION) { Application.LoadLevel(0); } return; } if (GUIManager.Instance.ItemsCount < 1 && _currentMessage + 1 < messages.Count) { if (_currentMessage == 0) { readyToSpawn = true; } _currentMessageItem = new GUIItem((float)(ScreenUtil.ScreenWidth / 2), ScreenUtil.getPixelHeight(280), messages[++_currentMessage], GUIManager.Instance.defaultStyle); GUIManager.Instance.addGUIItem(_currentMessageItem); } }
private void activeControlsList_KeyUp(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.Delete: if (activeControlsList.SelectedItem != null) { activeControlsList.Items.Remove(activeControlsList.SelectedItem); } break; case Keys.Escape: if (selectedItem != null) { selectedItem.Selected = false; selectedItem = null; activeControlsList.SelectedItem = null; } break; } canvas.Invalidate(); }
private GUIItem AddNewTaskItem(WinHandle window) { //window.TitleChanged += Window_TitleChanged; var g = new GUIItem(); Application.Current.Dispatcher.Invoke(() => { try { StackPanel s = new StackPanel(); ListBoxItem holder = new ListBoxItem(); holder.Focusable = false; s.Tag = window.Ptr.ToString(); holder.MouseLeftButtonUp += (object sender, MouseButtonEventArgs e) => { RefreshTasks(); window.MaximizeMinimize(); }; ContextMenu o = new ContextMenu(); var h = new MenuItem() { Header = "Close" }; h.Click += (object sender, RoutedEventArgs e) => { InteropHelper.CloseWindow((IntPtr)int.Parse(s.Tag.ToString())); }; o.Items.Add(h); s.ContextMenu = o; Label l = new Label(); l.Content = window.Title; s.Width = 60; l.Foreground = new SolidColorBrush(Colors.White); l.FontSize = 10; Image m = new Image(); var handle = window.WindowIcon.ToBitmap().GetHbitmap(); try { m.Source = Imaging.CreateBitmapSourceFromHBitmap(handle, IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); m.Width = 25; m.Height = 25; s.Children.Add(m); } finally { InteropHelper.DeleteObject(handle); } s.Children.Add(l); s.Height = 60; g.Destroy = () => { Application.Current.Dispatcher.Invoke(() => { Left += s.Width; ProcMenu.Width -= s.Width; ProcMenu.Items.Remove(ProcMenu.Items.OfType <ListBoxItem>().Where(x => x.Tag == s.Tag).First()); }); }; holder.Content = s; RefreshTasks(); ProcMenu.Items.Add(holder); Console.WriteLine("Added"); ProcMenu.Width += s.Width; Left -= s.Width; Width = ProcMenu.Width; } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }); return(g); }
public GUIItemsGroup(GUIItem[] items, Rect rect) : this(items, rect.position, rect.size) { }
public GUIItemsGroup(GUIItem[] items, Vector2 position, Vector2 size, Vector2 padding, Orientation orientation) : this(items, position, size, padding) { this.orientation = orientation; }
public GUIItemsGroup(GUIItem[] items, Vector2 position, Vector2 size) : this(items) { this.position = position; this.size = size; }
public GUIItemsGroup(GUIItem[] items) { this.items = items; }
//removes GUI Item public void removeGUIItem(GUIItem g) { _items.Remove(g); }
public GUINavigableItemsGroup(GUIItem[] items, Vector2 position, Vector2 size, Vector2 padding) : base(items, position, size, padding) { }
public GUINavigableItemsGroup(GUIItem[] items) : base(items) { }
public void Add(GUIItem item) { bottom++; children.Add(item); }
public GUIItemsGroup(GUIItem[] items, Rect rect, Orientation orientation) : this(items, rect) { this.orientation = orientation; }
private void LeftMouse() { if (selectedItem != null) { selectedItem.X = mouseX; selectedItem.Y = mouseY; } else { if (newItem == null && toolBox.SelectedItems.Count != 0) { switch ((GUINums)(int.Parse(toolBox.SelectedItems[0].Name))) { case GUINums.GUIRLargeWin: newItem = new GUIRLargeWin("LARGE", "0000000000"); break; case GUINums.GUIRnull: newItem = new GUIRnull(false); break; case GUINums.GUIRSmallWin: newItem = new GUIRSmallWin(mouseX + (container != null ? container.XOff : 0), mouseY + (container != null ? container.YOff : 0), "SMALL", "0000000000"); break; case GUINums.GUIRCheckbox: newItem = new GUIRCheckbox(mouseX, mouseY, "", GUIRCheckbox.CheckedState.Unchecked, "", container); break; case GUINums.GUIRRadio: newItem = new GUIRRadio(mouseX, mouseY, "", GUIRRadio.CheckedState.Unchecked, container); break; case GUINums.GUIRFullScreenImg: newItem = new GUIRFullScreenImg(0); break; case GUINums.GUIRHotspot: newItem = new GUIRHotspot(mouseX, mouseY, 0, 0, container); break; case GUINums.GUIRRect: newItem = new GUIRRect(mouseX, mouseY, 0, 0, 254, container); break; case GUINums.GUIRTextLineIn: newItem = new GUIRTextLineIn(mouseX, mouseY, 0, 30, "TEXT", container); break; case GUINums.GUIRPassIn: newItem = new GUIRPassIn(mouseX, mouseY, 0, 30, "TEXT", container); break; case GUINums.GUIRByteInt: newItem = new GUIRByteInt(mouseX, mouseY, 0, 255, 0, 255, container); break; case GUINums.GUIRWordInt: newItem = new GUIRWordInt(mouseX, mouseY, 0, 65535, 0, 65535, container); break; case GUINums.GUIRTextMultiline: newItem = new GUIRTextMultiline(mouseX, mouseY, 1, 0, "TEXTMULTI", 0, container); break; case GUINums.GUIRBorder: newItem = new GUIRBorder(mouseX, mouseY, 0, 0, GUIRBorder.RectColor.Black, container); break; case GUINums.GUIRText: newItem = new GUIRText(mouseX, mouseY, "TEXT", 0, container); break; case GUINums.GUIRScrollVert: newItem = new GUIRScrollVert(mouseX, mouseY, 0, scrollByte++, 1, 0, 100, 0); break; case GUINums.GUIRScrollHoriz: newItem = new GUIRScrollHoriz(mouseX, mouseY, 0, scrollByte++, 1, 0, 100, 0); break; default: break; } if (container == null && !(newItem is GUIContainer)) { MessageBox.Show("You must first push a container!"); newItem = null; } } } }
//add GUI Item //initialize GUIItem start time public void addGUIItem(GUIItem g) { _items.Add(g); g.starttime = Time.time; }
public GUINavigableItemsGroup(GUIItem[] items, Vector2 position, Vector2 size, Vector2 padding, Orientation orientation) : base(items, position, size, padding, orientation) { }
public override void Init() { Cursor.Hide(); Device d3dDevice = D3DDevice.Instance.Device; MyMediaDir = MediaDir + "WorkshopShaders\\"; MyShaderDir = ShadersDir + "WorkshopShaders\\"; // levanto el GUI gui.Create(MediaDir); // menu principal gui.InitDialog(false, false); int W = D3DDevice.Instance.Width; int H = D3DDevice.Instance.Height; int x0 = 70; int y0 = 10; int dy = 30; int dy2 = dy; int dx = 250; GUIItem item = gui.InsertImage("transformers//custom_char.png", x0, y0, MediaDir); item.image_centrada = false; y0 += dy; gui.InsertItem(new static_text(gui, "SCOUT", x0, y0, 400, 25)); y0 += 45; item = gui.InsertImage("transformers//scout.png", x0 + dx, y0, MediaDir); item.image_centrada = false; gui.InsertItem(new menu_item(gui, "SCOUT 1", "transformers//scout1.png", ID_SCOUT, x0, y0, MediaDir, dx, dy)); y0 += dy + 5; gui.InsertItem(new menu_item(gui, "SCOUT 2", "transformers//scout2.png", ID_SCOUT, x0, y0, MediaDir, dx, dy)); y0 += 2 * dy; gui.InsertItem(new static_text(gui, "HUNTER", x0, y0, 400, 25)); y0 += 45; item = gui.InsertImage("transformers//hunter.png", x0 + dx, y0, MediaDir); item.image_centrada = false; menu_item hunter1 = (menu_item)gui.InsertItem(new menu_item(gui, "HUNTER 1", "transformers//hunter1.png", ID_HUNTER, x0, y0, MediaDir, dx, dy)); hunter1.pos_imagen.Y = y0; y0 += 2 * dy; gui.InsertItem(new static_text(gui, "COMMANDER", x0, y0, 400, 25)); y0 += 45; item = gui.InsertImage("transformers//commander.png", x0 + dx, y0, MediaDir); item.image_centrada = false; menu_item commander1 = (menu_item)gui.InsertItem(new menu_item(gui, "COMMANDER 1", "transformers//commander1.png", ID_COMMANDER, x0, y0, MediaDir, dx, 25)); commander1.pos_imagen.Y = y0; y0 += 2 * dy; gui.InsertItem(new static_text(gui, "WARRIOR", x0, y0, 400, 25)); y0 += 45; item = gui.InsertImage("transformers//warrior.png", x0 + dx, y0, MediaDir); item.image_centrada = false; menu_item warrior1 = (menu_item)gui.InsertItem(new menu_item(gui, "WARRIOR 1", "transformers//warrior1.png", ID_WARRIOR, x0, y0, MediaDir, dx, 30)); warrior1.pos_imagen.Y = y0; dialog_sel = 0; }
public GUINavigableItemsGroup(GUIItem[] items, Rect rect) : base(items, rect) { }
public GUIItemsGroup(GUIItem[] items, Vector2 padding) : this(items) { this.padding = padding; }
public GUINavigableItemsGroup(GUIItem[] items, Rect rect, Vector2 padding) : base(items, rect, padding) { }
public GUIItemsGroup(GUIItem[] items, Vector2 position, Vector2 size, Vector2 padding) : this(items, position, size) { this.padding = padding; }
public GUINavigableItemsGroup(GUIItem[] items, Rect rect, Orientation orientation) : base(items, rect, orientation) { }
public GUIItemsGroup(GUIItem[] items, Orientation orientation) : this(items) { this.orientation = orientation; }
public GUINavigableItemsGroup(GUIItem[] items, Rect rect, Vector2 padding, Orientation orientation) : base(items, rect, padding, orientation) { }
public GUIItemsGroup(GUIItem[] items, Rect rect, Vector2 padding) : this(items, rect) { this.padding = padding; }
public void ShowInventory() { bool itemAdded = false; active = !active; if (active) { bool hammerAdded = false; int cantWood = 0, cantRope = 0; GUIItem woodGUIText = new GUIItem(); GUIItem ropeGUIText = new GUIItem(); int W = D3DDevice.Instance.Width; int H = D3DDevice.Instance.Height; int dy = H - 50; int dy2 = dy; int dx = W / 2; int posEnX = (W / 2) - (dx / 2); int posEnY = (H / 2) - (dy / 2); int x0 = posEnX + 150; int y0 = posEnY + 50; int x1 = x0; int y1 = y0; GUIItem frame = gui.InsertIFrame("", posEnX, posEnY, dx, dy, Color.FromArgb(92, 43, 43)); frame.c_font = Color.FromArgb(0, 0, 0); frame.scrolleable = true; collectedItems.ForEach(item => { GUIItem itemGui = new GUIItem(); if (item.Mesh.Name.Contains("wood")) { if (cantWood == 0) { itemAdded = true; itemGui = gui.InsertImage("wood2.png", x1, y1 + 30, MediaDir); woodGUIText = gui.InsertItem("Madera " + "(x" + ++cantWood + ")", x1 += 50, y1 + 20); } else { woodGUIText.text = "Madera " + "(x" + ++cantWood + ")"; } } else if (item.Mesh.Name.Contains("hammer") && !hammerAdded) { hammerAdded = true; itemAdded = true; itemGui = gui.InsertImage("hammer2.png", x1, y1 + 30, MediaDir); gui.InsertItem("Martillo", x1 += 50, y1 + 20); } else if (item.Mesh.Name.Contains("rope")) { if (cantRope == 0) { itemAdded = true; itemGui = gui.InsertImage("rope.png", x1, y1 + 30, MediaDir); ropeGUIText = gui.InsertItem("Soga " + "(x" + ++cantRope + ")", x1 += 50, y1 + 20); } else { ropeGUIText.text = "Soga " + "(x" + ++cantRope + ")"; } } else if (item.Mesh.Name.Contains("fatherNote")) { itemAdded = true; itemGui = gui.InsertImage("note.png", x1, y1 + 30, MediaDir); gui.InsertItem("Nota de papá", x1 += 50, y1 + 20); gui.InsertButton(1, "Usar", x1 += 300, y1, 120, 60); } if (itemAdded) { x1 = x0; y1 = y1 + 100; itemAdded = false; } }); if (ShowShipHelm) { GUIItem itemGui = new GUIItem(); itemAdded = true; itemGui = gui.InsertImage("timon.jpg", x1, y1 + 30, MediaDir); gui.InsertItem("Timon", x1 += 50, y1 + 20); gui.InsertItem("Se puede usar en la proa del barco", x1, y1 + 70); gui.InsertButton(2, "Usar", x1 += 300, y1, 120, 60); } } }
public GUIItemsGroup(GUIItem[] items, Rect rect, Vector2 padding, Orientation orientation) : this(items, rect, padding) { this.orientation = orientation; }
private void ResField_TextChanged(GUIItem item) { TextField textField = item as TextField; }