![]() |
![]() |
#1 |
Registered User
![]() Join Date: May 2022
Location: Adelaide
Posts: 94
|
Intuition Menus
How do I set the background colour of the menu bar and menu items? Thanks!
|
![]() |
![]() |
#2 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 2,400
|
You can't. Intuition only offers two layouts, the 2.0 layout (black background with pen 1, text with pen 0), or the new style rendering (white background, black text).
|
![]() |
![]() |
#3 | |
Registered User
![]() Join Date: May 2022
Location: Adelaide
Posts: 94
|
Quote:
Image 2 is my program, I want it to look like image 1. |
|
![]() |
![]() |
#4 |
Registered User
![]() Join Date: Oct 2021
Location: England
Posts: 774
|
are you using the window flag WFLG_NEWLOOKMENUS ? my program had crappy looking old menus style till i enabled that flag.
|
![]() |
![]() |
#5 |
Registered User
![]() Join Date: May 2022
Location: Adelaide
Posts: 94
|
|
![]() |
![]() |
#6 |
Registered User
![]() Join Date: Jun 2016
Location: europe
Posts: 852
|
For a KS3.0+ 3D look you could also try setting the pens tag (KS2.0+ but it will work in KS1.3 fine because it's ignored), at the end of ExtNewScreen (right after gadgets and custom bitmap) and ExtNewWindow (right after screen type) structures, set a pointer to tags. Something like:
Code:
MyNewScreen: ... DC.L 0,0 ; gadgets, custom bitmap DC.L MyTags ; v36+ MyNewWindow: ... DC.W CUSTOMSCREEN ; screen type DC.L MyTags ; v36+ MyTags: DC.L SA_Pens,MyPens DC.L TAG_END MyPens: DC.W ~0 |
![]() |
![]() |
#7 | |
Registered User
![]() Join Date: May 2022
Location: Adelaide
Posts: 94
|
Quote:
I want my programs menus to be white aswell, how do I achieve this? (Using standard WB screen) |
|
![]() |
![]() |
#8 |
Registered User
![]() Join Date: Jun 2016
Location: europe
Posts: 852
|
Which detail/block pen and flags do you specify for your window when you're creating it?
Also, forgot to mention you also have to use the NS_EXTENDED (screen) and WFLG_NW_EXTENDED (window) flag to set the tags as I described above. And ignore the whole screen part of it if you're using a public/wb screen. |
![]() |
![]() |
#9 |
Registered User
![]() Join Date: May 2022
Location: Adelaide
Posts: 94
|
I just realised changing the block pen works to change menu colour. Thanks.
|
![]() |
![]() |
#10 |
Registered User
![]() Join Date: May 2022
Location: Adelaide
Posts: 94
|
I want to make it so that when a menu item is selected, it's white on black, but using the complement highlight it turns from black on white to blue on green, how do I fix this?
|
![]() |
![]() |
#11 |
Registered User
![]() Join Date: May 2022
Location: Adelaide
Posts: 94
|
Also, in the menu for the clock app there are these squigly lines in the menu. How do I do that?
|
![]() |
![]() |
#12 | |
Registered User
![]() Join Date: Jun 2016
Location: europe
Posts: 852
|
Quote:
Image struct should be something like: Code:
DC.W 2,2 ; top offset, left offset DC.W 100,2 ; width, height DC.W 2 ; depth DC.L 0 ; image DC.B 0,DETAILPEN ; plane pick, plane on/off DC.L 0 ; next |
|
![]() |
![]() |
#13 | |
Registered User
![]() Join Date: May 2022
Location: Adelaide
Posts: 94
|
Quote:
|
|
![]() |
![]() |
#14 |
Registered User
![]() Join Date: Jun 2016
Location: europe
Posts: 852
|
Uhm, it should work automagically?
I typically want my stuff to look like WB so I use "defaults" and have no problems... DETAILPEN and BLOCKPEN as window pens, WFLG_NEWLOOKMENUS added to flags. I get what I'm expecting visually, nothing looks mismatched compared to other apps and WB, in KS1.3/2.x/3.x (and also with MagicMenu). Post relevant code or exe? |
![]() |
![]() |
#15 |
Registered User
![]() Join Date: May 2022
Location: Adelaide
Posts: 94
|
Oh I was being stupid.
My assembly includes are pre-v36, so the new menu define was missing and when I added it in I added $2000000 instead of $200000. Thanks for the help. |
![]() |
![]() |
#16 |
Registered User
![]() Join Date: May 2022
Location: Adelaide
Posts: 94
|
When I get a MENUPICK type message, where's the actual data?
if (number == MENUNULL) {...} else { MenuNumber = MENUNUM(number); ItemNumber = ITEMNUM(number); SubNumber = SUBNUM(number); } How do I get number? |
![]() |
![]() |
#17 |
Registered User
![]() Join Date: Jun 2016
Location: europe
Posts: 852
|
Use _LVOItemAddress() with a0 = menu strip and d0.w = im_Code from the message to locate the selected menu item. Or in C something like ItemAddress(menu_strip,msg->im_Code).
Number is im_Code, but you don't have to deal with that (just let the intuition do the work). |
![]() |
![]() |
#18 |
Registered User
![]() Join Date: May 2022
Location: Adelaide
Posts: 94
|
How do I make a workbench-standard file requester?
Last edited by Steam Ranger; 26 November 2022 at 13:07. |
![]() |
![]() |
#19 |
Registered User
![]() Join Date: Sep 2019
Location: Finland
Posts: 253
|
You probably need to check out the ASL library docs: http://amigadev.elowar.com/read/ADCD.../node017B.html
|
![]() |
![]() |
#20 |
Registered User
![]() Join Date: May 2022
Location: Adelaide
Posts: 94
|
Unrelated, but how do I lock a file so that neither the user nor any other proccess can edit it? It can still be read by other proccesses, though.
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Gfx glitch in menus | Octopus66 | support.AmigaOS | 12 | 05 October 2021 09:54 |
Intuition - Menus | Gilloo | Coders. System | 1 | 05 March 2012 10:11 |
Help ! Problems with user menus and start menus in Directory Opus 5.8 | beltrixx | support.Apps | 0 | 27 May 2009 08:30 |
Good menus/frontends. | killergorilla | Retrogaming General Discussion | 40 | 24 January 2008 21:16 |
Floating menus? | Mojo2000 | New to Emulation or Amiga scene | 6 | 30 January 2003 14:35 |
|
|