#193 Increased windowstyle interaction

open
nobody
engine (98)
5
2003-09-22
2003-09-22
August Bigelow
No

It would great if you could access and alter
windowstyle properties within Sphere. Here are a few
examples.

windowstyle.getBackgroundMode()
windowstyle.setBackgroundMode(int mode)

windowstyle.getGradientColor(int corner)
windowstyle.setGradientColor(int corner, color mask)

windowstyle.getSectionColorMask(int section)
windowstyle.setSectionColorMask(int section, color mask)

The color mask stuff would require a change to the
windowstyle format. There should really only be two
sections: the background (0) and the edges (1). I think
everything else is pretty much explanatory.

Discussion

  • August Bigelow
    August Bigelow
    2003-09-22

    • labels: --> engine
     
  • August Bigelow
    August Bigelow
    2003-09-22

    Logged In: YES
    user_id=614751

    Wow. I actually implemented .getBackgroundMode() and gave
    functionality to .getColorMask() (which will need to be axed
    anway).

     
  • Logged In: NO

    Retrieving the individual edge images would also be useful, I
    believe.

    The most useful windowstyle function I'd like to see is the
    ability to draw a windowstyle onto a surface. (If this is
    already possible, I can't find it in doc_functions)

    Also, I think it would be nice to be able to draw windows with
    some edges missing. Something like:
    ws_object.drawIncompleteWindow(x, y, w, h,
    TOP_EDGE+RIGHT_EDGE+BACKGROUND);
    Would allow the easy construction of irregularly shaped or
    non-rectangular textboxes.

     
  • Logged In: NO

    Setting the background mode would be a good thing... at the
    moment, I have 2 different windowstyles with identical images
    so that I can choose between tiled and stretched. That's just
    wasteful.

    And yes, drawing a windowstyle to a surface would be great.