simeonpilgrim / coab

Automatically exported from code.google.com/p/coab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Navigation in horizontal menus does not work

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. Bring game to any state where there is a horizontal menu (camp, town,
combat, etc... not sure about command, though)
2. Try to navigate with comma and dot.
3.

What is the expected output? What do you see instead?
Comma should navigate to the left and dot to the right in the menu.
Instead, nothing happens.

What version of the product are you using? On what operating system?
SVN head

Please provide any additional information below.
Problem is that seg043.GetInputKey returns 32 for several characters,
including comma and dot.

Source of problem seems to be in Keyboard.cs:

        public static ushort KeyToIBMKey(Keys key)
        {
            ...

            return 0x0020;
        }

Adding these lines before the final return solves the problem:

            if (key == Keys.Oemcomma)
            {
                return 0x2c;
            }

            if (key == Keys.OemPeriod)
            {
                return 0x2e;
            }

By the way, I think it would be more readable to use switch instead of the
majority of the if's.

Original issue reported on code.google.com by surrano on 18 Sep 2009 at 10:13

There is another place to fix:

ovr027.buildInputKeys:

            bp_var_8E = var_2A;

should be

            bp_var_8E = var_2A + 1;

Explanation: the items in the list are counted upon reaching the next item. For 
the
last one it is stored in the array of highlights, but not counted in the number 
of items.

Original comment by surrano on 18 Sep 2009 at 10:23

Fixed (via your changes) in SVN 285 - thanks for finding and fixing this.

Original comment by simeon.pilgrim on 19 Sep 2009 at 5:50

Original comment by simeon.pilgrim on 19 Sep 2009 at 5:50

  • Changed state: Fixed

Original comment by simeon.pilgrim on 28 Jul 2010 at 10:32