[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  WindowResize() doesn't set the background color.

WindowResize() doesn't set the background color.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Pages: 1  2 

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #15 on Tue 24 Aug 2010 05:50 PM (UTC)
Message
David Haley said:
You can still keep your library's APIs simple while working around whatever you want to work around in MUSHclient's API. When asked for a concrete use case, I don't think it's really an answer to say that you're trying to keep some API simple; just push the feature to the API if you have to. Or keep it simple and don't handle certain cases (perhaps with a warning).

I don't understand why you think the underlying API affects your API. Even if the MUSHclient API were utterly nasty, you can still write a nice API on top of it, even if it goes through many contortions under the hood. A nasty core API would affect the implementation under the hood of your API, sure, but not the API itself.


Oh, sure, I agree. But there's literally no way to change the transparency color once you've created the window, without recreating the window. And recreating the window (and all the work it entails to keep everything else the same) is too much work just to remove one parameter from Window.new(). When the underlying API literally can't do something, you can't reasonably expect a wrapper API to do it.

Like I said, it's no skin off my back if nothing's done. I simply see a problem, and I thought we might be able to find a reasonable solution.


By the way, I -did- go through a lot of contortions with the miniwidget library project. There are very real barriers to making a nice wrapper API. Just like Nick said, this is all done for free, and there's a tipping point where so much effort is involved for not enough gain.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #16 on Tue 24 Aug 2010 08:59 PM (UTC)
Message
Twisol said:

Ouch. It's a one-liner change, surely this can't be about the effort involved to do this. Did I say something wrong?


You filed as a bug report something that is behaving exactly as documented, and therefore is not a bug. From the documentation for WindowResize:

WindowResize docs said:

This resizes an existing miniwindow of the given name.

If the new size is larger than the existing size the BackgroundColour is used to fill any newly exposed area.

...

Any existing hotspots, images, and fonts are preserved. All other window parameters for this miniwindow are unchanged.


(my emphasis)

It is done exactly this way so that you can have a colour to fill any area that is larger than the original. The "background colour" of the original miniwindow may be being used for transparency purposes, and you may not want the new area to be transparent.

This was done with careful consideration, and not an omission of a "one line change" that would improve it.



- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #17 on Tue 24 Aug 2010 09:11 PM (UTC)

Amended on Tue 24 Aug 2010 09:20 PM (UTC) by Twisol

Message
*sigh* Yes, I'm not arguing your logic. Clearly I just misunderstood, or thought the documentation was confusing/inspecific/<other>, or something. WindowPosition affects the flags, I figured WindowResize would affect the background color.

Lets not keep referring to the OP intent every step of the way, please. Things change over the course of a discussion. I posted to bring up an issue for discussion. It's extremely discouraging when my early remarks are held against me. My very second post agreed with your logic.

Nnngh. I'm going to stop here.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #18 on Tue 24 Aug 2010 09:23 PM (UTC)
Message
Twisol said:

But there's literally no way to change the transparency color once you've created the window, without recreating the window.


I've added a new flag to WindowCreate that lets you keep the hotspots, as you seem to want, if I read it correctly, and also Fiendish suggested.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


48,528 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]