English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 20 May 2021, 19:05   #1
alancfrancis
Registered User
 
alancfrancis's Avatar
 
Join Date: Jun 2020
Location: Scotland
Posts: 146
Menu strip colours

Hey folks,

Just starting to try and remember some of what I've forgotten for a lot of years regarding Amiga C programming. I've done a bunch of CLI stuff and its mostly coming back, but now I'm trying to dip my toe into Intuition.

I have a screen which I create with SA_LikeWorkbench and a window I put on that screen. So far, so good everything looks like a clone of the WB screen in terms of look and feel. title bar of the screen is draggable, shows the title and is black text on white, just like WB.

I've just tried to add a simple menu strip and colours are off.

On workbench:

no right click - title is black-on-white

right click on window - menus appear and bar is still black-on-white
pull down a menu - menu items appear black-on-white with a black border
select an item - selected box is white-on-black

On my screen:

no right click - title is black-on-white

right click on window - menus appear and bar is grey-on-black
pull down a menu - menu items appear white-on-black with a grey border
select an item - selected box is blue-on-white

So it seems like the pens are somehow mixed up, but since its created like workbench, all the other colours (window borders, screen and window gadgets) looks perfectly fine.

I tried messing with the pens in the IntuiText structure for the menu items and all that did was make each individual line look weird, the menu itself was still a black strip with grey menu text.

Anyhoo, any suggestions appreciated. Is there some place where I can tell either the screen or the window "your menu strip should be these colours" ?

Alan

Last edited by alancfrancis; 20 May 2021 at 19:15.
alancfrancis is offline  
Old 20 May 2021, 19:40   #2
alancfrancis
Registered User
 
alancfrancis's Avatar
 
Join Date: Jun 2020
Location: Scotland
Posts: 146
Lighbulb moment. The menus I am looking at "on workbench" are the workbench menus themselves. If I start, say, ed and fire up the menus from *its* window, it's just like mine - grey on black, blue on white highlight.

So my screen+window *is* behaving just like a window on the workbench screen.

I have to say I prefer the black on white that workbench uses itself though. ah well.
alancfrancis is offline  
Old 20 May 2021, 19:47   #3
alancfrancis
Registered User
 
alancfrancis's Avatar
 
Join Date: Jun 2020
Location: Scotland
Posts: 146
Lightbulb 2: This is why I ask questions on this board cause as soon as I think I've exhausted every option and just ask the board, I find an answer so the universe can continue making me look dumb :-)

WFLG_NEWLOOKMENUS. ftw.
alancfrancis is offline  
Old 20 May 2021, 21:32   #4
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
Thumbs up!
Samurai_Crow is offline  
Old 21 May 2021, 17:32   #5
alancfrancis
Registered User
 
alancfrancis's Avatar
 
Join Date: Jun 2020
Location: Scotland
Posts: 146
I switched over to using GadTools/NewMenu structures and it changed colours again. Still a white background, but now grey text instead of black :-). The Command-Keys are still in black so I know its not disabled, and the text is definitely the standard grey colour, rather than the "greyed out".

Ah well, good enough that I'll move on and keep going with this learning exercise. The GadTools/NewMenu menus are much clearer to setup.
alancfrancis is offline  
Old 21 May 2021, 17:47   #6
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
Quote:
Originally Posted by alancfrancis View Post
I switched over to using GadTools/NewMenu structures and it changed colours again.

The NewLookMenu flags have to be set accordingly. If you use GFLG_NEWLOOKMENUS you have to set GTNM_NewLookMenus to TRUE, too. If you don't set GFLG_NEWLOOKMENUS you should set GTNM_NewLookMenus to FALSE or omit it.
thomas is offline  
Old 21 May 2021, 21:33   #7
alancfrancis
Registered User
 
alancfrancis's Avatar
 
Join Date: Jun 2020
Location: Scotland
Posts: 146
Quote:
Originally Posted by thomas View Post
The NewLookMenu flags have to be set accordingly. If you use GFLG_NEWLOOKMENUS you have to set GTNM_NewLookMenus to TRUE, too. If you don't set GFLG_NEWLOOKMENUS you should set GTNM_NewLookMenus to FALSE or omit it.
Thanks! I shall take a look.
alancfrancis is offline  
Old 21 May 2021, 21:35   #8
alancfrancis
Registered User
 
alancfrancis's Avatar
 
Join Date: Jun 2020
Location: Scotland
Posts: 146
I can't seem to find either of those constants in the NDK headers ?
alancfrancis is offline  
Old 21 May 2021, 21:37   #9
alancfrancis
Registered User
 
alancfrancis's Avatar
 
Join Date: Jun 2020
Location: Scotland
Posts: 146
Quote:
Originally Posted by thomas View Post
The NewLookMenu flags have to be set accordingly. If you use GFLG_NEWLOOKMENUS you have to set GTNM_NewLookMenus to TRUE, too. If you don't set GFLG_NEWLOOKMENUS you should set GTNM_NewLookMenus to FALSE or omit it.

Aha! I found GTMN_NewLookMenus, I just blindly searched for your typo (facepalm for me) but not GFLG_NEWLOOKMENUS... unless you meant WFLG_NEWLOOKMENUS ?
alancfrancis is offline  
Old 21 May 2021, 21:44   #10
alancfrancis
Registered User
 
alancfrancis's Avatar
 
Join Date: Jun 2020
Location: Scotland
Posts: 146
Bingo. Worked like a charm. Thanks @Thomas !
alancfrancis 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
Strip Poker datadisks mai request.Old Rare Games 39 21 November 2022 18:45
Strip Fighter screenshots Solo Kazuki HOL contributions 11 24 December 2020 18:33
Strip Poker Live (CDTV) bagpipes request.Old Rare Games 119 11 November 2017 19:49
Strip Poker Live mai HOL contributions 13 24 August 2008 17:05
Strip Pot CD32!!! Big-Byte MarketPlace 0 29 January 2005 19:00

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 08:09.

Top

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