Browse code

make reui_init() use saxmono font for child windows (right now that equates windows for printed data)

Dario Rodriguez authored on 15/01/2021 22:20:48
Showing 1 changed files
... ...
@@ -16,6 +16,7 @@
16 16
 #include <stdarg.h>
17 17
 #include "re_ui.h"
18 18
 #include "hack_regular.h"
19
+#include "saxmono.h"
19 20
 
20 21
 #define DEFAULTTITLEPREFIX "re - "
21 22
 #define DEFAULTWINDOWWIDTH 80
... ...
@@ -85,7 +86,10 @@ reui_init(int fontheight, reui_t *parent)
85 86
         ui->screenh=screenrect.h;
86 87
         /* font */
87 88
         ui->fontheight=fontheight; /* placeholder, will fill later with real value */
88
-        ui->fontdata=SDL_RWFromConstMem(hack_regular,SIZE_HACK_REGULAR);
89
+        if(parent==NULL)
90
+                ui->fontdata=SDL_RWFromConstMem(hack_regular,SIZE_HACK_REGULAR);
91
+        else
92
+                ui->fontdata=SDL_RWFromConstMem(saxmono,SIZE_SAXMONO);
89 93
         SDL_RWseek(ui->fontdata,0,RW_SEEK_SET);
90 94
         if(ui->fontdata==NULL
91 95
           || TTF_Init()==-1