English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 18 January 2014, 17:09   #1
AGS
XoXo/Tasko Developer
 
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
Question 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.
AGS is offline  
Old 18 January 2014, 18:34   #2
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,335
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.
mark_k is online now  
Old 18 January 2014, 20:42   #3
AGS
XoXo/Tasko Developer
 
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
Well, I followed your tip. Everything is well, except the icons have all the wrong colors.
AGS is offline  
Old 18 January 2014, 21:04   #4
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,335
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.
mark_k is online now  
Old 18 January 2014, 21:50   #5
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Quote:
Originally Posted by AGS View Post
Well, I followed your tip. Everything is well, except the icons have all the wrong colors.

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.
thomas is offline  
Old 18 January 2014, 22:34   #6
AGS
XoXo/Tasko Developer
 
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
But I noticed with PeterK's new icon.library the colors are correct always.
AGS is offline  
Old 02 March 2014, 04:27   #7
Michael
A1260T/PPC/BV/SCSI/NET
 
Michael's Avatar
 
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 839
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.
Michael is offline  
Old 02 March 2014, 05:08   #8
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,365
Quote:
Originally Posted by AGS View Post
But I noticed with PeterK's new icon.library the colors are correct always.
That's probably only when you use a Hi/TrueColor screenmode, because then my icon.library displays the 24 bit RGB colors with direct drawing onto the screen by using the CGX-function WritePixelArray(). If you switch to 256 colors or AGA you will get the same results as with the original icon.library.

Did you call LayoutIconA() -- Adapt a palette-mapped icon for display ?
PeterK is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:17.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.41848 seconds with 15 queries