[ZeroBrane Studio] Re: Change the tooltip formatting via interpreter? How to distribute interpreter & api?

  • From: jan@xxxxxxxxxxx
  • To: zerobrane@xxxxxxxxxxxxx
  • Date: Fri, 17 Oct 2014 12:33:45 +0200

Hey Paul,

thanks for the answer!

What would you change in the formatting? There are some options
related to tooltip generation (for example, you can specify the width
in characters), but other than that, it simply lays out the text you
have.


Well, I would mostly reorder things and have descriptions of parameters "belonging" to the parameters, so that their description is displayed whenever the parameter is the current one being entered. But I guess this would really require a total rewrite of the tooltip part. Another thing I do not like is that ZBS formats what you put into the API-definition files without asking, I saw that it makes custom lines out of the text, removes newlines, etc.. There should be an option to configure it or a function to overwrite within the API (or better the interpreter, similar to frun, fprojdir, etc.) which can be used instead to do the formatting, maybe call it ftooltip.

I agree, it would be interesting to support this, but unfortunately
it's not going to be easy, as this is something that Scintilla (the
editor component ZBS is using) provides and the content of the tooltip
is limited to one style (so it's not possible to make fragments of it
bold or italic). Here is Scintilla documentation on tooltips (call
tips in their terminology):
http://www.scintilla.org/ScintillaDoc.html#CallTips


Hmm, this leaves the impression that this functionality is really limited in Scintilla. I think it would probably be a better idea not to use call tips for this at all and instead display a normal (borderless) window with formatted text instead on the location of the call tip. This would allow any formatting. Much more work than using call tips, obviously, but I find that this is a feature where ZBS still is a lot behind the functionality of VS, NetBeans, QtCreator, MonoDevelop, etc. Of course, I only know Qt and wxWidgets, which would both make this possible, but I have no clue about Scintilla. But any UI lib should be capable of displaying a custom window at position x,y.

Sorry if that comes across a bit harsh, but IMO the quality of the tooltips (which is "meh") is in stark contrast to the quality of the rest of ZBS (which is "hooray!"). We plan to use ZBS as our "official" IDE for devs and modders once the game is released as we love the feature set. But especially for modders, we would really love to have a more capable tooltip.

If you have them packaged as one plugin, you can then put that file
into $HOME/.zbstudio/packages/ folder and ZBS will recognize and load
the plugin.


That sounds good. Is the folder structure inside ~/.zbstudio/ the same as in the "normal" program folder, so the api has to go to ".zbstudio/api/lua", etc.?


Other related posts: