From 9529adb3e1fcf9d48ce9ddf1ed6fa5f5628cb819 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 23 Nov 2019 12:41:13 +0100 Subject: [PATCH] - font tables moved. --- source/common/menu/menudef.cpp | 30 ------------------------------ source/duke3d/src/d_menu.cpp | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/source/common/menu/menudef.cpp b/source/common/menu/menudef.cpp index cbf085cd1..867430200 100644 --- a/source/common/menu/menudef.cpp +++ b/source/common/menu/menudef.cpp @@ -452,36 +452,6 @@ static void ParseListMenuBody(FScanner &sc, FListMenuDescriptor *desc) sc.MustGetString(); desc->mNetgameMessage = sc.String; } -#if 0 - else if (sc.Compare("PlayerDisplay")) - { - bool noportrait = false; - FName action = NAME_None; - sc.MustGetNumber(); - int x = sc.Number; - sc.MustGetStringName(","); - sc.MustGetNumber(); - int y = sc.Number; - sc.MustGetStringName(","); - sc.MustGetString(); - PalEntry c1 = V_GetColor(NULL, sc.String); - sc.MustGetStringName(","); - sc.MustGetString(); - PalEntry c2 = V_GetColor(NULL, sc.String); - if (sc.CheckString(",")) - { - sc.MustGetNumber(); - noportrait = !!sc.Number; - if (sc.CheckString(",")) - { - sc.MustGetString(); - action = sc.String; - } - } - FListMenuItemPlayerDisplay *it = new FListMenuItemPlayerDisplay(desc, x, y, c1, c2, noportrait, action); - desc->mItems.Push(it); - } -#endif else { sc.ScriptError("Unknown keyword '%s'", sc.String); diff --git a/source/duke3d/src/d_menu.cpp b/source/duke3d/src/d_menu.cpp index 356464116..e3c231294 100644 --- a/source/duke3d/src/d_menu.cpp +++ b/source/duke3d/src/d_menu.cpp @@ -45,6 +45,22 @@ BEGIN_DUKE_NS #define MENU_HEIGHT_CENTER 100 +// common font types +// tilenums are set after namesdyn runs. +// These are also modifiable by scripts. +// emptychar x,y between x,y zoom cursorLeft cursorCenter cursorScale textflags +// tilenum shade_deselected shade_disabled pal pal_selected pal_deselected pal_disabled +MenuFont_t MF_Redfont = { { 5<<16, 15<<16 }, { 0, 0 }, 65536, 20<<16, 110<<16, 65536, TEXT_BIGALPHANUM | TEXT_UPPERCASE, + -1, 10, 0, 0, 0, 0, 1, + 0, 0, 1 }; +MenuFont_t MF_Bluefont = { { 5<<16, 7<<16 }, { 0, 0 }, 65536, 10<<16, 110<<16, 32768, 0, + -1, 10, 0, 0, 10, 10, 16, + 0, 0, 16 }; +MenuFont_t MF_Minifont = { { 4<<16, 5<<16 }, { 1<<16, 1<<16 }, 65536, 10<<16, 110<<16, 32768, 0, + -1, 10, 0, 0, 2, 2, 0, + 0, 0, 16 }; + + static void Menu_DrawTopBar(const vec2_t origin) { if ((G_GetLogoFlags() & LOGO_NOTITLEBAR) == 0) @@ -64,6 +80,19 @@ static void Menu_DrawTopBarCaption(const char *caption, const vec2_t origin) captionmenutext(origin.x + (MENU_MARGIN_CENTER<<16), origin.y + (24<<16) + ((15>>1)<<16), t); } +int GetMenuFontHeight(int fontnum) +{ + +} + +int GetMenuTextWidth(int fontnum, const char* text) +{ +} + +void GameInterface::DrawNativeMenuText(int fontnum, int palnum, int xpos, int ypos, float fontscale, const char* text, int orientation) +{ +} + class DukeListMenu : public DListMenu