projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
84f1052
)
moved code to get font for "choose tree" screen to separate function
author
Holger Schemel
<info@artsoft.org>
Thu, 17 Feb 2022 16:27:39 +0000
(17:27 +0100)
committer
Holger Schemel
<info@artsoft.org>
Thu, 17 Feb 2022 16:27:39 +0000
(17:27 +0100)
src/screens.c
patch
|
blob
|
history
diff --git
a/src/screens.c
b/src/screens.c
index 6f18bf310babc9be7551832c40abfde657ddb345..49f390f973f643616266c0e1a78cfce6d6a432ce 100644
(file)
--- a/
src/screens.c
+++ b/
src/screens.c
@@
-4862,6
+4862,14
@@
static void DrawChooseTree(TreeInfo **ti_ptr)
FadeIn(fade_mask);
}
FadeIn(fade_mask);
}
+static int getChooseTreeFont(TreeInfo *node, boolean active)
+{
+ int font_color = MENU_CHOOSE_TREE_COLOR(node, active);
+ int font_nr = MENU_CHOOSE_TREE_FONT(font_color);
+
+ return font_nr;
+}
+
static void drawChooseTreeText(int y, boolean active, TreeInfo *ti)
{
int num_entries = numTreeInfoInGroup(ti);
static void drawChooseTreeText(int y, boolean active, TreeInfo *ti)
{
int num_entries = numTreeInfoInGroup(ti);
@@
-4872,8
+4880,7
@@
static void drawChooseTreeText(int y, boolean active, TreeInfo *ti)
int entry_pos = first_entry + y;
TreeInfo *node_first = getTreeInfoFirstGroupEntry(ti);
TreeInfo *node = getTreeInfoFromPos(node_first, entry_pos);
int entry_pos = first_entry + y;
TreeInfo *node_first = getTreeInfoFirstGroupEntry(ti);
TreeInfo *node = getTreeInfoFromPos(node_first, entry_pos);
- int font_color = MENU_CHOOSE_TREE_COLOR(node, active);
- int font_nr = MENU_CHOOSE_TREE_FONT(font_color);
+ int font_nr = getChooseTreeFont(node, active);
int font_xoffset = getFontBitmapInfo(font_nr)->draw_xoffset;
int xpos = MENU_SCREEN_START_XPOS;
int ypos = MENU_SCREEN_START_YPOS + y;
int font_xoffset = getFontBitmapInfo(font_nr)->draw_xoffset;
int xpos = MENU_SCREEN_START_XPOS;
int ypos = MENU_SCREEN_START_YPOS + y;