Poster | Thread |
r-tea
| |
[E, MUI or general] Embossed font Posted on 28-Mar-2017 17:04:56
| | [ #1 ] |
|
|
|
Regular Member |
Joined: 21-Nov-2004 Posts: 315
From: Zdzieszowice, Poland | | |
|
| Is there a way to change a style of a font directly in the code - not in MUI preferences? I need to insert an emboss-like short information text somewhere out of buttons or other gadgets. I already did emboss tekst in buttons with MUI prefs.
This is what I need to do in code. I've read about italics, bold, colours in AmigaE docs, but there's nothing more. Maybe there are some MUI specific formatings hidden that I can use i E code? Last edited by r-tea on 28-Mar-2017 at 05:06 PM.
_________________ I miss draggable screens in MorphOS... and do you? I know I'm in a minority unfortunately. |
|
Status: Offline |
|
|
tboeckel
| |
Re: [E, MUI or general] Embossed font Posted on 29-Mar-2017 7:07:06
| | [ #2 ] |
|
|
|
Regular Member |
Joined: 7-Oct-2004 Posts: 274
From: Rehmerloh, Germany | | |
|
| @r-tea
Most probably you want ghosted text. Use "\033g" as preparse string to activate ghosted text and "\033G" to disable it again. Essentially this is a simple shadow effect with swapped colors (light colored shadow, dark colored text).
I don't know whether this works with MUI 3.8 already, but at least with MUI 3.9 and all further versions. _________________ Why stop it now, just when I am hating it?
Thore Böckelmann |
|
Status: Offline |
|
|
r-tea
| |
Re: [E, MUI or general] Embossed font Posted on 1-Apr-2017 18:40:36
| | [ #3 ] |
|
|
|
Regular Member |
Joined: 21-Nov-2004 Posts: 315
From: Zdzieszowice, Poland | | |
|
| @tboeckel
Thank you. It looks a bit different, but actually this is what I expected. Don't know why, but I had to use "\eg" instead of "\033g". Maybe it's because I use ECX compiler - nor EC. Is somewhere out there a complete list of formatting codes like the one you have mentioned?
Last edited by r-tea on 01-Apr-2017 at 09:59 PM.
_________________ I miss draggable screens in MorphOS... and do you? I know I'm in a minority unfortunately. |
|
Status: Offline |
|
|
r-tea
| |
Re: [E, MUI or general] Embossed font Posted on 2-Apr-2017 11:27:35
| | [ #4 ] |
|
|
|
Regular Member |
Joined: 21-Nov-2004 Posts: 315
From: Zdzieszowice, Poland | | |
|
| @tboeckel
Oh, and is there a way to affect the font size inside the code?
_________________ I miss draggable screens in MorphOS... and do you? I know I'm in a minority unfortunately. |
|
Status: Offline |
|
|
Hypex
| |
Re: [E, MUI or general] Embossed font Posted on 2-Apr-2017 14:47:34
| | [ #5 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11181
From: Greensborough, Australia | | |
|
| @r-tea
There is a list here from the mui.e module source. BTW the "\033" would be octal for 27 which is escape code in C. So with E/CX it just uses an "\e" which I think is more readable anyway. E for Escape.
/*************************************************************************** ** Control codes for text strings ***************************************************************************/
#define MUIX_R '\er' /* right justified */ #define MUIX_C '\ec' /* centered */ #define MUIX_L '\el' /* left justified */
#define MUIX_N '\en' /* normal */ #define MUIX_B '\eb' /* bold */ #define MUIX_I '\ei' /* italic */ #define MUIX_U '\eu' /* underlined */
#define MUIX_PT '\e2' /* text pen */ #define MUIX_PH '\e8' /* highlight text pen */ Last edited by Hypex on 02-Apr-2017 at 02:54 PM.
|
|
Status: Offline |
|
|
r-tea
| |
Re: [E, MUI or general] Embossed font Posted on 2-Apr-2017 16:40:45
| | [ #6 ] |
|
|
|
Regular Member |
Joined: 21-Nov-2004 Posts: 315
From: Zdzieszowice, Poland | | |
|
| @Hypex
Is it full list? Can't see thr "g" code mentioned by tboeckel. _________________ I miss draggable screens in MorphOS... and do you? I know I'm in a minority unfortunately. |
|
Status: Offline |
|
|
tboeckel
| |
Re: [E, MUI or general] Embossed font Posted on 2-Apr-2017 17:48:31
| | [ #7 ] |
|
|
|
Regular Member |
Joined: 7-Oct-2004 Posts: 274
From: Rehmerloh, Germany | | |
|
| |
Status: Offline |
|
|
tboeckel
| |
Re: [E, MUI or general] Embossed font Posted on 2-Apr-2017 17:55:13
| | [ #8 ] |
|
|
|
Regular Member |
Joined: 7-Oct-2004 Posts: 274
From: Rehmerloh, Germany | | |
|
| Quote:
Oh, and is there a way to affect the font size inside the code?
|
Set MUIA_Font to either one of the special values or to a TextFont pointer returned by OpenFont().
http://muidev.de/wiki/Documentation/API/MUI_Area#MUIA_Font
Keep in mind that it is a bad idea in general to enforce a specific font by setting a TextFont pointer from OpenFont(), as the user has no chance to modify this font via MUI prefs. You enforce a specific font with a specific size which does not necessarily match the other fonts the user has configured. So better stick with either the MUIV_Font_XXX values or leave the default settings active._________________ Why stop it now, just when I am hating it?
Thore Böckelmann |
|
Status: Offline |
|
|
Hypex
| |
Re: [E, MUI or general] Embossed font Posted on 3-Apr-2017 15:16:00
| | [ #9 ] |
|
|
|
Elite Member |
Joined: 6-May-2007 Posts: 11181
From: Greensborough, Australia | | |
|
| @r-tea
It is for the text escape strings. But it may be an old MUI 3.8 version module. It's from libraries/mui.m. |
|
Status: Offline |
|
|
r-tea
| |
Re: [E, MUI or general] Embossed font Posted on 5-Apr-2017 8:12:29
| | [ #10 ] |
|
|
|
Regular Member |
Joined: 21-Nov-2004 Posts: 315
From: Zdzieszowice, Poland | | |
|
| @tboeckel
Thanks. This documentation seems to be a bit newer than the one on MUI's home website.
I'll use MUIV_Font_xxx special values. _________________ I miss draggable screens in MorphOS... and do you? I know I'm in a minority unfortunately. |
|
Status: Offline |
|
|