18 January 2014, 17:09 | #1 |
XoXo/Tasko Developer
Join Date: Dec 2013
Location: Munich
Age: 49
Posts: 450
|
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. Last edited by AGS; 18 January 2014 at 18:07. |
18 January 2014, 18:34 | #2 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,349
|
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. Last edited by mark_k; 18 January 2014 at 18:48. |
18 January 2014, 20:42 | #3 |
XoXo/Tasko Developer
Join Date: Dec 2013
Location: Munich
Age: 49
Posts: 450
|
Well, I followed your tip. Everything is well, except the icons have all the wrong colors.
|
18 January 2014, 21:04 | #4 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,349
|
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. |
18 January 2014, 21:50 | #5 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,026
|
|
18 January 2014, 22:34 | #6 |
XoXo/Tasko Developer
Join Date: Dec 2013
Location: Munich
Age: 49
Posts: 450
|
But I noticed with PeterK's new icon.library the colors are correct always.
|
02 March 2014, 04:27 | #7 |
A1260T/PPC/BV/SCSI/NET
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 841
|
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. |
02 March 2014, 05:08 | #8 | |
Registered User
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,385
|
Quote:
Did you call LayoutIconA() -- Adapt a palette-mapped icon for display ? |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Open Amiga Game Database - Open Beta | FrodeSolheim | support.FS-UAE | 3 | 01 May 2013 22:37 |
Why can't I open the Topaz-font in a boot block? | Leffmann | Coders. General | 13 | 19 May 2010 21:52 |
Need a small win98 prog, to open and close a directX screen... | keropi | Retrogaming General Discussion | 9 | 25 April 2008 18:43 |
ALE is open.... | Malc | Amiga websites reviews | 1 | 05 August 2001 17:20 |
|
|