English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 18 January 2014, 18:09   #1
AGS
XoXo/Tasko Developer
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 43
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 19:07.
AGS is offline  
Old 18 January 2014, 19:34   #2
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,962
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 19:48.
mark_k is online now  
Old 18 January 2014, 21:42   #3
AGS
XoXo/Tasko Developer
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 43
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, 22:04   #4
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,962
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, 22:50   #5
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 5,717
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, 23:34   #6
AGS
XoXo/Tasko Developer
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 43
Posts: 450
But I noticed with PeterK's new icon.library the colors are correct always.
AGS is offline  
Old 02 March 2014, 05:27   #7
Michael
A1260T/PPC/BV/SCSI/NET

Michael's Avatar
 
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 649
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, 06:08   #8
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,385
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 23:37
Why can't I open the Topaz-font in a boot block? Leffmann Coders. General 13 19 May 2010 22:52
Need a small win98 prog, to open and close a directX screen... keropi Retrogaming General Discussion 9 25 April 2008 19:43
ALE is open.... Malc Amiga websites reviews 1 05 August 2001 18: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 16:42.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.06652 seconds with 13 queries