Move scroll position by more than 1

  • #1, by tall-story-gamesFriday, 14. August 2020, 00:47 4 years ago
    Hi,

    I have an inventory which consists of two rows of 4 items.
    I'd like the scroll up/down buttons to shift the entire row either up/down (with any left over spaces becoming blank) as opposed to simply shifting the items within those rows by 1 position with each click.

    I tried adding a "Left click" action to the scroll buttons along the lines of:
    game.CurrentCharacter.ItemsScrollPosition = game.CurrentCharacter.ItemsScrollPosition - 4

    But this didn't appear to work at all.

    Any ideas where I could start with this?

    Cheers
    Tom

    Newbie

    42 Posts


  • #2, by afrlmeFriday, 14. August 2020, 03:54 4 years ago
    There's actually an option in the properties section of the interface where you can specify scroll amount.

    Also I would recommend not having "scroll to item" (or whatever it is called) in the add/remove item action part, especially if you want to scroll by x amount instead of 1, or you know at some point that you plan on manipulating the items with script.

    Imperator

    7278 Posts

  • #3, by tall-story-gamesFriday, 14. August 2020, 16:24 4 years ago
    Oh man, never thought to look there! I'll go through and remove all my "scroll to item" commands now smile

    Thank you. smile

    Newbie

    42 Posts

  • #4, by tall-story-gamesFriday, 14. August 2020, 16:41 4 years ago
    Hmm, I wonder if I'm missing something.
    I've set the property in the interface settings (see screenshot) but the buttons continue to scroll by only one position up and down.

    I've tried it in a new build as well as within the editor.

    Any ideas? roll

    Cheers
    Tom

    Newbie

    42 Posts

  • #5, by tall-story-gamesFriday, 14. August 2020, 17:09 4 years ago
    I've solved it!

    I duplicated the interface, assigned the new one to my main character and it all works fine now. I guess it had just cached that setting somewhere and didn't want to update it this late in the process.

    Newbie

    42 Posts

  • #6, by afrlmeFriday, 14. August 2020, 20:48 4 years ago
    If you have other issues like that, check the ved root folder & see if a folder called tmp exists, if it does then delete it - actually just delete it whenever you see it. better safe than sorry. smile

    Imperator

    7278 Posts