Skip to content
Browse files

Fixes a minor issue with mousewheel scrolling while NPC is talking.

*  Using the mousewheel after selecting a topic would scroll through the
   previously available options. In vanilla Skyrim, the selected topic would
   be sort of "locked" until the NPC has done talking. Since the mousewheel
   event now calls moveSelectionUp/Down() for a smoother scrolling, it
   also called the update function which would redraw the other options
   (I think *blush*). Now it just checks for the menustate and will not
   initiate scrolling until menu state is back to TOPIC_LIST_SHOWN.
  • Loading branch information...
1 parent 86e7157 commit ba35b0b559939e9b53179599f96757a46f168357 @fabd committed Dec 8, 2012
Showing with 12 additions and 8 deletions.
  1. +12 −8 src/dialoguemenu/DialogueCenteredList.as
View
20 src/dialoguemenu/DialogueCenteredList.as
@@ -134,15 +134,19 @@ class DialogueCenteredList extends Shared.CenteredScrollingList
bRecenterSelection = false;
}
}*/
-//GlobalFunc.getInstance().Deebug("bRecenterSelection = " + bRecenterSelection);
var listItem: MovieClip
- // keep it simple, stupid
- if (delta < 0) {
- moveSelectionDown();
- } else {
- moveSelectionUp();
+ //fabd++ List_mc (this) => TopicListHolder => DialogueMenu_mc
+ var dialogueMenuObj: DialogueMenu = DialogueMenu(_parent._parent);
+//GlobalFunc.getInstance().Deebug("onMouseWheel() menuState == " + dialogueMenuObj.menuState);
+ if (dialogueMenuObj.menuState == DialogueMenu.TOPIC_LIST_SHOWN)
+ {
+ if (delta < 0) {
+ moveSelectionDown();
+ } else {
+ moveSelectionUp();
+ }
}
// Vanilla scroll wheel handling for reference
@@ -171,8 +175,8 @@ class DialogueCenteredList extends Shared.CenteredScrollingList
for (var i: Number = 0; i < EntriesA.length; i++) {
if (EntriesA[i].topicIndex == aiTopicIndex) {
iScrollPosition = i;
- iSelectedIndex = i;
- iHighlightedIndex = i;
+ iSelectedIndex = i; //fabd++
+ iHighlightedIndex = i; //fabd++
}
}
}

1 comment on commit ba35b0b

@fabd
Owner
fabd commented on ba35b0b Dec 15, 2012

This commit corresponds to version 1.2 on the Nexus.

Please sign in to comment.
Something went wrong with that request. Please try again.