Open Screen / Open Font
Hi,
I am trying to clone the Workbench-Screen. Therefore I need to set up a TextAttr-Structure to open the Screen's Font for myself. My question is, if I must store that TextAttr-Structure and the fontname in it until I close the font or if I can free both after I have the font opened? I have read this: http://amigadev.elowar.com/read/ADCD.../node05B2.html but it is still not clear to me. a EDIT: I am now using the tag "Sa_SysFont" (set to 1) to say that I want to have the WB's font in my screen. No need to do any further font stuff. ;) |
Not directly answering your question, but if you're running on Kickstart 3.0 or later, you can use the SA_LikeWorkbench tag when opening the screen instead.
If you want to clone the default public screen (which is usually Workbench, but might not be) use LockPubScreen(0) instead of LockPubScreen("Workbench"). Generally, I think you may as well also pass SA_MinimizeISG when opening a custom screen too. |
Well, I followed your tip. Everything is well, except the icons have all the wrong colors.
|
Maybe try using SA_FullPalette when you open the screen? Or set the palette manually with SA_Colors?
From the OpenScreen autodoc: SA_FullPalette: this is a Boolean attribute. Prior to V36, there were just 7 RGB color values that Intuition maintained in its user preferences (playfield colors 0-3, and colors 17-19 for the sprite). When opening a screen, the color map for the screens viewport is first initialized by graphics (graphics.library/GetColorMap()) then these seven values are overridden to take the preferences values. In V36, Intuition maintains a full set of 32 preferences colors. If you specify TRUE for SA_FullPalette, Intuition will override ALL color map entries with its full suite of preferred colors. |
Quote:
Like with everything screen-related you have to load the icons after the screen has been opened and you have to tell icon.library which screen to use to allocate pens. |
But I noticed with PeterK's new icon.library the colors are correct always. :)
|
A lot depends on picture.datatype and type of video output AGA/CGX/P96.
Old versions incl. OS3.9 version of picture.datatype can cause funny colours on custom screens. |
Quote:
Did you call LayoutIconA() -- Adapt a palette-mapped icon for display ? |
All times are GMT +2. The time now is 04:24. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.