Results 1 to 7 of 7

Thread: redraw scriptList buttons on property change

  1. #1
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    620

    Default redraw scriptList buttons on property change

    The talk about the toolbar in the other forum made me think that the feature that I use frequently is the scriptList buttons. It's sort of a "make-your-own" toolbar.

    Currently any changes made to the scriptList property aren't updated until logging out / in and the gui is re-drawn. The daily deeds panel used to be the same way but at some point it was changed so that it re-draws itself when the property changes, which is very handy.

    I would like to request that the scriptList button bar please be given the same feature. Then, one could script changes to that property on a per-situation basis and have their "toolbar" adapt to their current situation without logging in and out.

  2. #2
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    10,858

    Default

    An issue is that there are two options for the script bar:

    1) Added to the right of the desktop toolbar
    2) Vertically on the right.

    You can change that property, too - and it will require restarting to move the script toolbar from place to another.

    I'll experiment with updating the vertical panel when you change scripts.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  3. #3
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    620

    Default

    Thank you for looking at this ! I've actually tinkered around trying to add this feature myself but so far I've failed.
    Last edited by AlbinoRhino; 01-10-2017 at 06:42 PM.

  4. #4
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    10,858

    Default

    Revision 17662 should do this for you if you have "script buttons on the right"; it will create a toolbar even if you have zero scripts specified in scriptList and will update any time that setting changes, adding and deleting buttons as needed.

    I did nothing for the "script buttons at end of main toolbar". I also did not make it update the GUI if you enable the script bar for the first time or disable it entirely or switch between top row and right side or vice versa; you have to restart, as before, to see those changes.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  5. #5
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    10,858

    Default

    You know, I think the "add script buttons to the end of the regular toolbar" is stupid. What I'd like:

    Don't show script toolbar
    Show script toolbar on right side.

    And then, always create the toolbar, but only load it with the list of script buttons if "Show script toolbar".

    The toolbar then listens to both settings - scriptButtonPosition and scriptList - and loads the buttons only if the former is true, and changes the buttons whenever the latter changes, as it is now.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  6. #6
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    10,858

    Default

    Revision 17664 does it that way.

    We always create a toolbar on the right side of the main panel to hold script buttons.
    If you have "Don't show script toolbar", there are no buttons on it and Swing suppresses it.
    If you have "Show script toolbar on right side", we load it with buttons and Swing shows it.
    If you change scriptList, we change the buttons.
    If you change scriptButtonPosition, we show or don't show it.
    Ph'nglui mglw'nafh Cthulhu
    R'lyeh wgah-nagl fhtagn.

  7. #7
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    620

    Default

    Thank you very much ! This is fantastic. It must still be Crimbo !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •