Results 1 to 7 of 7

Thread: Modification suggestion on get_button_area_input function

  
  1. #1
    Ghost
    Join Date
    Dec 2010
    Location
    Madrid, Spain
    Posts
    359

    Default Modification suggestion on get_button_area_input function

    With the rewritten function get_button_area_input function, now we can go throw the chars on the savegame title using the cursor arrows, that's good! But now the cursor draw has been changed and it is not like the original DK.

    I post two images to let you see it clearly:

    Original DK cursor:


    New KeeperFX cursor (different style):


    The original DK cursor has:
    - A dimension of 7x2 pixels
    - A shadow (that is exactly displaced one pixel to the right, and two pixel down respect to the original cursor draw position. The RGB value of the shadow is always R:20 G:16 B:0, independently what pixel is below)
    - A color of R:204 G:80 B:40

    however, the new cursor has:
    - A dimension of 9x2 pixels
    - Not shadow
    - A color of R:160 G:64 B:24

    Also the new cursor position is displaced four pixels to down direction (Y axis) respect to the original position where it must be.

    This will be the expected result trying to modify the last char of the savegame title, as you see it keeps the original DK cursor draw:


    The current new KeeperFX cursor:


    Can these little changes be made easily to keep original DK UI style? THANKS!
    Last edited by jomalin; July 24th, 2012 at 22:06. Reason: I wrote the new KeeperFX cursor RGB value incorrectly. Also, I specified the shadow RGB value

  2. #2
    KeeperFX Author mefistotelis's Avatar
    Join Date
    Sep 2009
    Location
    Poland
    Posts
    1,235

    Default Re: Modification suggestion on get_button_area_input function

    Keeping the shadow might be a good idea, but I'm not sure about its location - making it lower looks better for me.
    Length of the cursor now depends on the letter over it - putting it under "l" should make it shorter.

    Can you give me indexes of the colors in the palette?
    I think the current color index of the cursor is 70.

  3. #3
    Ghost
    Join Date
    Dec 2010
    Location
    Madrid, Spain
    Posts
    359

    Default Re: Modification suggestion on get_button_area_input function

    Quote Originally Posted by mefistotelis View Post
    Keeping the shadow might be a good idea, but I'm not sure about its location
    Shadow is exactly the same dimension of the cursor (7x2) and it is displaced respect to the cursor, one pixel to the right, and two pixels to down.

    Quote Originally Posted by mefistotelis View Post
    Length of the cursor now depends on the letter over it - putting it under "l" should make it shorter.
    Sorry, but I don't think so, look at the msdos command line cursor for example, the cursor length is always the same:


    The cursor has the same length for the "I" char than for the "c" char. This is the normal behaviour I always see in games.

    Quote Originally Posted by mefistotelis View Post
    Can you give me indexes of the colors in the palette?
    I think the current color index of the cursor is 70.
    I have done those screen captures with the default Screen Capture button of the keyboard, because KeeperFX is unable to save a screenshot pressing Shift + C during the list of savegames screen (but is able to save it on the options menu when you press Esc during gameplay!).

    These are the indexes of the original DK draws:
    color cursor: 73
    shadow color cursor: 1
    Last edited by jomalin; July 25th, 2012 at 00:01. Reason: Add that KeeperFX is able to save a screenshot on options menu and color indexes

  4. #4
    Ghost
    Join Date
    Dec 2010
    Location
    Madrid, Spain
    Posts
    359

    Default Re: Modification suggestion on get_button_area_input function

    I have tried your last modification related to cursor. If you don't want the original cursor dimension (7x2, instead of 9x2) and the original cursor placement (four pixels upside the current)...

    - The shadow must have another line below his line, this is why is 7x2 (2 consecutive horizontal rows). Currently the shadow is 9x1
    - The shadow must be one pixel displaced to the right, like the shadow on the chars. How is made currently, is like light comes from one place for the chars, and from other to the cursor.
    - The index must be 73, not 70 (I have checked this another time). 73 is used for example for the point that the "i" char has.

    Current 9x2 cursor:


    Expected 9x2 cursor:
    Last edited by jomalin; July 25th, 2012 at 07:10.

  5. #5
    Ghost
    Join Date
    Dec 2010
    Location
    Madrid, Spain
    Posts
    359

    Default Re: Modification suggestion on get_button_area_input function

    OK mefistotelis, I have checked your last modification on SVN (486) and now cursor is much better!


    But only one thing to be perfect, entire shadow must be displaced one pixel to the left! Can you please do this little change?

    You can see at the base of the "E" char from the string "UNUSED", that is like the cursor (an horizontal line with the same thickness), and you will see that the shadow is like the cursor but displaced only 1 pixel on the X axis, instead of 2 pixels.

    I post you two images to let you see what I say:

    Current cursor with shadow displaced two pixels to the right:


    Expected cursor with the shadow displaced one pixel to the right:


    THANKS AGAIN AND SORRY ABOUT MY PERFECTIONISM...

  6. #6
    Ghost
    Join Date
    Dec 2010
    Location
    Madrid, Spain
    Posts
    359

    Default Re: Modification suggestion on get_button_area_input function

    A part from correcting the position of the cursor shadow (simply move it one pixel to the left) that I have told in the previous post to be exact like original DK, and that mefistotelis has the cursor code fresh, a possible good feature come to my mind now, is to make 3 keys from the keyboard work when we write the savegame:

    Home: will put the cursor in the first char
    End: will put the cursor in the next char before the last one
    Delete (don't confuse it with backspace): will erase the current char and the cursor must not move from the current position

    To reproduce this, go to the XP/Win7/Vista command line, write something, and press those keys.

  7. #7
    Ghost
    Join Date
    Dec 2010
    Location
    Madrid, Spain
    Posts
    359

    Default Re: Modification suggestion on get_button_area_input function

    OK, the r487 on the SVN correct the cursor shadow, apart of give correct names to some flags, now is perfect!

Similar Threads

  1. Replies: 8
    Last Post: January 23rd, 2011, 09:20
  2. Replies: 4
    Last Post: January 9th, 2011, 14:46

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •