zedblade Posted November 7, 2014 Share Posted November 7, 2014 Hello, I need to make a tooltip like TinckerConstruct tooltip style with more info by holding "sfift" or "ctrl" button. thx Quote Link to comment Share on other sites More sharing options...
shieldbug1 Posted November 7, 2014 Share Posted November 7, 2014 If you want to do this override addInformation in your item(and block?). I think it's a client only method, so you should be fine use Keyboard.isKeyDown(int) to check for LSHIFT, RSHIFT, LCONTROL and RCONTORL. If you want to do this for vanilla items, you need to create an event handler to listen for the ItemTooltipEvent. Quote BEFORE ASKING FOR HELP READ THE EAQ! I'll help if I can. Apologies if I do something obviously stupid. If you don't know basic Java yet, go and follow these tutorials. Link to comment Share on other sites More sharing options...
Ernio Posted November 7, 2014 Share Posted November 7, 2014 https://github.com/squeek502/TiC-Tooltips/releases/tag/v1.1.11b Bottom right - src code. THe answer is still basically same as from guy above. Quote 1.7.10 is no longer supported by forge, you are on your own. Link to comment Share on other sites More sharing options...
zedblade Posted November 7, 2014 Author Share Posted November 7, 2014 If you want to do this override addInformation in your item(and block?). I think it's a client only method, so you should be fine use Keyboard.isKeyDown(int) to check for LSHIFT, RSHIFT, LCONTROL and RCONTORL. If you want to do this for vanilla items, you need to create an event handler to listen for the ItemTooltipEvent. Yes, i put some code on addInformation in my Item but i dont know how intercept "IF KEY PRESSED" event ...have you an example? thx Quote Link to comment Share on other sites More sharing options...
shieldbug1 Posted November 7, 2014 Share Posted November 7, 2014 ... Keyboard.isKeyDown(int) to check for LSHIFT, RSHIFT, LCONTROL and RCONTORL. ... Quote BEFORE ASKING FOR HELP READ THE EAQ! I'll help if I can. Apologies if I do something obviously stupid. If you don't know basic Java yet, go and follow these tutorials. Link to comment Share on other sites More sharing options...
daafganggdg Posted November 7, 2014 Share Posted November 7, 2014 I think the KeyEvent class has all the ID's for Keyboard.isKeyDown(int) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.