Vswe's Summer Courses | You're not logged in. Sign up or log in | Server time: | Donate
One can now see other persons' badge hunts. Simply head over to their profiles to access them.

Go back to course page

Climbing the interface ladder

From basic graphical interfaces to very advanced ones

Getting the Item on the mouse

  • 2013-08-08 20:01:43
    Is it possible to get the ItemStack that is currently moved by the mouse? I had a look in GuiContainer, but i couldnt figure it out.
  • 2013-08-08 21:09:36
    If you have the player in a variable called player you can do:

    player.inventory.getItemStack()
  • 2013-08-09 09:21:58
    Cool, that works! Thanks for the help.
  • 2013-08-09 09:29:21
    I can't really think of a good reason to use it and am therefore a bit curious of what you're making. Care to enlighten a curious modder? :)
  • 2013-08-09 21:21:55
    I'm making a robot that you can programm to do diffrent things, and to add an order to the list you click on an area in the interface. Then depending on the item you hold, it adds the corresponding order there.
    Now i actually have an other question about the synchronisation from server to client since sendProgressbarUpdate can only send shorts. May I put that here or should I open a new thread?
  • 2013-08-09 22:42:12
    Sounds very nice. You could put it here but it might be better to start a new thread :)
  • 2017-09-30 11:25:34
    Black Desert ???? 2015 ????, ????????? ? ????? MMORPG ?????? ????????? ?
    ????????? ? ???? ?????? ???????? ?????????? ??????-?????.
    ????????????????? ???????, ???????? ????????????? ????????? ?
    ???????????? ??????? ??? ???????? ? ??????? ??????????? ?
    ????????????? ????? ?????????????
    https://goo.gl/Nop3eP
    Reborn – ??? ????? ?????????? ??????-????, ??????? ?????????
    ?????? ? ??? ???????, ???????????? ????????? ???????? ?
    ?????????????? ?????????????.
    https://goo.gl/K2Fxn7
    ???? ???? ? ??????? ?? ????????, ???????? ? ?????? ???????
  • 2017-10-01 16:09:46
    Black Desert ???? 2015 ????, ????????? ? ????? MMORPG ?????? ????????? ?
    ????????? ? ???? ?????? ???????? ?????????? ??????-?????.
    ????????????????? ???????, ???????? ????????????? ????????? ?
    ???????????? ??????? ??? ???????? ? ??????? ??????????? ?
    ????????????? ????? ?????????????
    https://goo.gl/Nop3eP
    Reborn – ??? ????? ?????????? ??????-????, ??????? ?????????
    ?????? ? ??? ???????, ???????????? ????????? ???????? ?
    ?????????????? ?????????????.
    https://goo.gl/K2Fxn7
  • Log in or sign up to reply to this thread