Search found 3 matches

by janitor61
Thu Dec 08, 2011 09:46
Forum: Partly official engine development
Topic: getting tool tips to work
Replies: 6
Views: 1658

You defined "std::string getDescription()" in InventoryItem and MaterialItem, but "std::string getDescription() const" in CraftItem and ToolItem. These are different overloads. You're right - thank you for pointing that out; I was able to get this to work, updated my fork and made a feature branch:...
by janitor61
Wed Dec 07, 2011 17:52
Forum: Partly official engine development
Topic: getting tool tips to work
Replies: 6
Views: 1658

oh, and here's my branch: https://github.com/janitor61/minetest/tree/testbranch (apologies for the nondescript name)

If all else fails I suppose I could add a dictionary for the description names using the InventoryItem->getText() return as a key with something like irr::core::map...
by janitor61
Wed Dec 07, 2011 06:46
Forum: Partly official engine development
Topic: getting tool tips to work
Replies: 6
Views: 1658

getting tool tips to work

https://gist.github.com/1441721 (actual .cpp edits start at 486) I am able to get the tool tip reading out the information on hover, and I could write out InventoryItem->getText(), which gives me a string like "1 blahblah 2", so I decided to add descriptions in init.lua and try to percolate them th...