+static int getChooseTreeEditFont(boolean active)
+{
+ return (active ? FONT_MENU_2_ACTIVE : FONT_MENU_2);
+}
+
+static int getChooseTreeEditXPos(int pos)
+{
+ boolean has_scrollbar = screen_gadget[SCREEN_CTRL_ID_SCROLL_VERTICAL]->mapped;
+ int xoffset = (has_scrollbar ? -1 : 0);
+ int xpos = MENU_SCREEN_TEXT2_XPOS + xoffset;
+ int sx = amSX + xpos * TILEX;
+ int font_nr = getChooseTreeEditFont(FALSE);
+ int width = getTextWidth(STR_CHOOSE_TREE_EDIT, font_nr);
+
+ return (pos == POS_RIGHT ? sx + width - 1 : sx);
+}
+
+static int getChooseTreeEditYPos(int ypos_raw)
+{
+ int ypos = MENU_SCREEN_START_YPOS + ypos_raw;
+ int sy = amSY + ypos * TILEY;
+
+ return sy;
+}
+
+static void drawChooseTreeEdit(int ypos_raw, boolean active)
+{
+ int sx = getChooseTreeEditXPos(POS_LEFT);
+ int sy = getChooseTreeEditYPos(ypos_raw);
+ int font_nr = getChooseTreeEditFont(active);
+
+ DrawText(sx, sy, STR_CHOOSE_TREE_EDIT, font_nr);
+}
+