Jaysburn
Alright I'm mostly sure I get it. What you're saying is essentially I've got to winget the position of the window the maps in and accommodate where in the window the map is, break that down from a string to x and y variables using findtext() and textnum(), figure out the x and y of where on the screen the object the mouse is over is and place the prompt accordingly?Mar 4, 2:36 pm I'll fiddle around but thanks for the help!
Jaysburn wrote:
Could you give me an example? I understand not wanting to post it here so if you could, you can email me it at jay_l12@hotmail.com I don't have an example for you, sadly. I use like 100 lines of code for mine (which I'd rather not give out) because of a ton of exceptions like whether to put the tooltip to the top, bottom, left, right depending on if it would get cut off otherwise and the width and height of it depending on the text inside and so on. I'm sure there are plenty of developers in the developer help section that would be glad to help you out, though.
Jaysburn
Could you give me an example? I understand not wanting to post it here so if you could, you can email me it at jay_l12@hotmail.comMar 2, 3:55 pm As for the onscreen text, I would but it's not just a simple tooltip I'm having come up it's going to be a small window with a bit of information and the requirements to craft the item. Thank you!
Jaysburn wrote:
Hey Aaiko, I was wondering if you could give me some advice. In Teridal you have description windows come up when you hold the mouse over an object in your inventory or on the map. Now that's no problem to do, but how is it that you make them appear right next to the mouse? It's a little complicated the way I do it, but basically mousing over something returns a "screen-loc" parameter. Just take the x*32 and the y*32 (with some other adjustments where needed) and you have a window.pos value where the object is. This is assuming the map takes up the entire screen. If you have other things around the top or left of the map, you have to calculate it in also. The new BYOND update has onscreen text. I'd suggest just making onscreen tooltips with it rather than the Windows-based interface tooltips you're asking about. |
|
Copyright © 2012 BYOND.
All rights reserved.
Mar 4, 5:30 pm
What you could do is stick the map inside a child and keep it as a static size so that you know the exact size of the map and the position would be 0,0 in the child. The tooltip window would be in the same child over the map.
But again, using the new 494 onscreen text is a much better option.