コード例 #1
0
        internal static void display_highlighed_text(int highlighed_word, int highlightFgColor,
                                                     string text, int xOffset, int fgColor, HighlightSet highlights) /* sub_6C1E9 */
        {
            if (text.Length > 0)
            {
                for (int i = 0; i < text.Length; i++)
                {
                    if (highlights[highlighed_word].start <= i &&
                        highlights[highlighed_word].end >= i &&
                        highlightFgColor != 0)
                    {
                        Seg041.DisplayChar(text[i], 1, highlightFgColor, 0, 0x18, xOffset + i);
                    }
                    else if (highlightable_text.MemberOf(text[i]) == true)
                    {
                        Seg041.DisplayChar(text[i], 1, 0, highlightFgColor, 0x18, xOffset + i);
                    }
                    else
                    {
                        Seg041.DisplayChar(text[i], 1, 0, fgColor, 0x18, xOffset + i);
                    }
                }

                if (text.Length + xOffset < 0x27)
                {
                    Seg041.DisplayChar(' ', (0x27 - text.Length - xOffset) + 1,
                                       0, 0, 0x18, xOffset + text.Length);
                }

                Display.Update();
            }
        }
コード例 #2
0
        static void sub_6C897(int index,
                              int yEnd, int xEnd, int yStart, int xStart, List <MenuItem> list,
                              int normalColor, int headingColor, int displayFillWidth) // sub_6C897
        {
            seg037.draw8x8_clear_area(yEnd, xEnd, yStart, xStart);

            MenuItem var_4 = getStringListEntry(list, index);

            int yCol  = yStart;
            int count = System.Math.Min(yEnd - yStart + 1, list.Count - index);

            foreach (var menu in list.GetRange(index, count))
            {
                Seg041.DisplayString(menu.Text, 0, menu.Heading ? headingColor : normalColor, yCol, xStart);

                if (menu.Text.Length < displayFillWidth)
                {
                    Seg041.DisplayChar(' ', displayFillWidth - menu.Text.Length, 0, 0, yCol,
                                       menu.Text.Length + xStart);
                }

                yCol++;
            }
        }