[interfacekit] Re: TextRequestDialog

I don't have write access.

Wouldn't you put it in InterfaceDefs.cpp ?

Alan

Waldemar Kornewald wrote:
THe dialog sounds like a good idea.


I suppose you do not want to write that, too? ;)


Here's some code for that screen thing:


That saves some work for me. :)


#include <Rect.h>
#include <Screen.h>

BRect& center_on_screen(BRect& _rect)
{
BRect r = BScreen().Frame();

_rect.OffsetTo((r.Width() - Rect.Width()) / 2.0,
              (r.Height() - Rect.Height()) / 2.0);

return _rect;
}


I recommend putting the func in InterfaceDefs


Why did you not put commit this?
Which source file should I use? ScreenUtils.cpp? Screen.cpp? Globals.cpp?
This should definitely become part of BScreen, some day.

Bye,
Waldemar



Other related posts: