1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resolved How to deal with actions that bring up a separate interface?

Discussion in 'Developer Support' started by Serene, Jun 2, 2016.

  1. Serene

    Serene ( ͡° ͜ʖ ͡°)

    Joined:
    Mar 30, 2015
    Messages:
    2,408
    Likes Received:
    508
    Aaaand another question.
    I can't find it anywhere in the jdocs and I'm stumped. For things like enchanting bolts, construction, lunar spells, etc. another window pops up where you have multiple options to choose from, and even some of those options have right click make all or make 'x' choices. I'm guessing it is an InterfaceComponent? But can't figure out how to choose a specific option from that window that pops up.

    Tried getting mouse location but still unable to figure out how to get specific locations with the devKit. It doesn't update the mouse information with a mouse click or anything really.

     
    #1 Serene, Jun 2, 2016
    Last edited: Jun 2, 2016
  2. Best Answer:
    Post #4 by SlashnHax, Jun 2, 2016
  3. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,212
    Likes Received:
    1,042
    You get the InterfaceComponent you want to interact with and then use component.interact("action");
     
  4. Serene

    Serene ( ͡° ͜ʖ ͡°)

    Joined:
    Mar 30, 2015
    Messages:
    2,408
    Likes Received:
    508
    Yes but my question is how would I get that InterfaceComponent. If I go to enchant bolts and the query screen for bolt enchanting pops up: would it be more along the lines of InterfaceComponent.getName("Enchant Crossbow Bolt").getComponents to get a list of all of the options that would be available?
     
  5. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,212
    Likes Received:
    1,042
    Interfaces.newQuery() and then use methods such as .texts and .actions. Like if "Enchant Crossbow Bolt" is the text, you'd do Interfaces.newQuery().texts("Enchant Crossbow Bolt").results() to get the results of all interface components with that text.
     
  6. Serene

    Serene ( ͡° ͜ʖ ͡°)

    Joined:
    Mar 30, 2015
    Messages:
    2,408
    Likes Received:
    508
    Nevermind got it fixed. Thanks Slash.
     
    #5 Serene, Jun 2, 2016
    Last edited: Jun 2, 2016

Share This Page

Loading...