func (i *inventoryScreen) click(down bool, x, y float64, w, h int) { if down { if i.activeSlot != -1 { item := Client.activeInventory.Items[i.activeSlot] Client.activeInventory.Items[i.activeSlot] = i.cursorItem Client.network.Write(&protocol.ClickWindow{ ID: byte(Client.activeInventory.ID), Slot: int16(i.activeSlot), Button: 0, Mode: 0, ActionNumber: 42, ClickedItem: ItemStackToProtocol(item), }) i.setCursor(item) } else if !i.inWindow { Client.network.Write(&protocol.ClickWindow{ ID: byte(Client.activeInventory.ID), Slot: int16(-999), Button: 0, Mode: 0, ActionNumber: 42, ClickedItem: ItemStackToProtocol(nil), }) i.setCursor(nil) } return } ui.Click(x, y, w, h) }
func (om *optionMenu) click(down bool, x, y float64, w, h int) { om.fov.click(down, x, y, w, h) om.mouseS.click(down, x, y, w, h) if down { return } ui.Click(x, y, w, h) }
func (vm *volumeMenu) click(down bool, x, y float64, w, h int) { for _, s := range vm.sliders { s.click(down, x, y, w, h) } if down { return } ui.Click(x, y, w, h) }
func (b *baseUI) click(down bool, x, y float64, w, h int) { if down { return } ui.Click(x, y, w, h) }