Browse files

Commented out debug messages for packaging.

  • Loading branch information...
1 parent 4bc9472 commit 3277b7f9a35dedb5e4856d2098be8ce6c95b4e39 @fabd committed Nov 24, 2012
View
18 src/common/Shared/BSScrollingList.as
@@ -108,7 +108,7 @@ class Shared.BSScrollingList extends MovieClip
item.onRollOver = function ()
{
if (!_parent.listAnimating && !_parent.bDisableInput && itemIndex != undefined) {
-GlobalFunc.getInstance().Deebug("onRollOver() doSetSelectedIndex " + itemIndex);
+//GlobalFunc.getInstance().Deebug("onRollOver() doSetSelectedIndex " + itemIndex);
_parent.doSetSelectedIndex(itemIndex, 0, true);
_parent.bMouseDrivenNav = true;
}
@@ -150,7 +150,7 @@ GlobalFunc.getInstance().Deebug("onRollOver() doSetSelectedIndex " + itemIndex);
function handleInput(details: InputDetails, pathToFocus: Array): Boolean
{
-GlobalFunc.getInstance().Deebug("handleInput() BSScrollingList");
+//GlobalFunc.getInstance().Deebug("handleInput() BSScrollingList");
var bHandledInput: Boolean = false;
if (!bDisableInput) {
var item: MovieClip = GetClipByIndex(selectedIndex - scrollPosition);
@@ -206,10 +206,7 @@ GlobalFunc.getInstance().Deebug("handleInput() BSScrollingList");
bListAnimating = abFlag;
}
- /**
- *
- *
- */
+ //fabd++ The function can now set mouse highlight (visual) separately from the selected state
function doSetSelectedIndex(aiNewIndex:Number, aiKeyboardOrMouse: Number, abMouseFocus: Boolean): Void
{
// current focus is selectedindex, or mouse highlighted index (decoupled from selection)
@@ -226,7 +223,7 @@ GlobalFunc.getInstance().Deebug("handleInput() BSScrollingList");
var iCurrentIndex: Number = iHighlightedIndex;
iHighlightedIndex = aiNewIndex;
-GlobalFunc.getInstance().Deebug("iHighlightedIndex = " + iHighlightedIndex);
+//GlobalFunc.getInstance().Deebug("iHighlightedIndex = " + iHighlightedIndex);
if (iCurrentIndex != -1)
SetEntry(GetClipByIndex(EntriesA[iCurrentIndex].clipIndex), EntriesA[iCurrentIndex]);
@@ -251,13 +248,10 @@ GlobalFunc.getInstance().Deebug("iHighlightedIndex = " + iHighlightedIndex);
}
}
- /**
- * If parameters are (-1, 0), clears the existing selected index.
- *
-
+ //fabd-- the old code for reference
+ /*
function doSetSelectedIndex(aiNewIndex:Number, aiKeyboardOrMouse: Number): Void
{
-GlobalFunc.getInstance().Deebug("doSetSelectedIndex("+aiNewIndex+") iSelectedIndex="+iSelectedIndex);
if (!bDisableSelection && aiNewIndex != iSelectedIndex) {
var iCurrentIndex: Number = iSelectedIndex;
iSelectedIndex = aiNewIndex;
View
8 src/common/Shared/CenteredScrollingList.as
@@ -206,8 +206,8 @@ class Shared.CenteredScrollingList extends Shared.BSScrollingList
if (itemIndex != undefined) {
iSelectedIndex = itemIndex;
- iHighlightedIndex = itemIndex; //faB++
- bRecenterSelection = true; //fab
+ iHighlightedIndex = itemIndex; //fabd++
+ bRecenterSelection = true; //fabd++
if (iScrollPosition > 0)
--iScrollPosition;
@@ -227,8 +227,8 @@ class Shared.CenteredScrollingList extends Shared.BSScrollingList
}
if (itemIndex != undefined) {
iSelectedIndex = itemIndex;
- iHighlightedIndex = itemIndex; //faB++
- bRecenterSelection = true; //fab
+ iHighlightedIndex = itemIndex; //fabd++
+ bRecenterSelection = true; //fabd++
if (iScrollPosition < iMaxScrollPosition)
++iScrollPosition;
View
3 src/common/Shared/GlobalFunc.as
@@ -3,12 +3,14 @@ class Shared.GlobalFunc
static var RegisteredTextFields: Object = new Object();
static var RegisteredMovieClips: Object = new Object();
+ // mini console log for debugging
private var debugWindow:MovieClip = null;
private var debugBg:MovieClip = null;
private var debugTxt:TextField = null;
private var DEBUGLOG_HEIGHT:Number = 100;
+ // singleton instance
private static var inst:GlobalFunc = null;
public function GlobalFunc()
@@ -54,7 +56,6 @@ class Shared.GlobalFunc
debugWindow._y = 0;
var format:TextFormat = new TextFormat("$ConsoleFont", 14, 0xCCCCCC);
- //format.color = 0xFFFF00;
debugTxt.setNewTextFormat(format);
}
View
18 src/dialoguemenu/DialogueCenteredList.as
@@ -1,5 +1,4 @@
-//faB++
-import Shared.GlobalFunc;
+import Shared.GlobalFunc; //fabd++
class DialogueCenteredList extends Shared.CenteredScrollingList
{
@@ -39,7 +38,7 @@ class DialogueCenteredList extends Shared.CenteredScrollingList
var centerIndex: Number = iScrollPosition - iNumTopHalfEntries < 0 ? 0 : iScrollPosition - iNumTopHalfEntries;
-GlobalFunc.getInstance().Deebug("UpdateList() ci " + centerIndex + " iscroll " + iScrollPosition + " sel " + iSelectedIndex);
+//GlobalFunc.getInstance().Deebug("UpdateList() ci " + centerIndex + " iscroll " + iScrollPosition + " sel " + iSelectedIndex);
iListItemsShown = 0;
@@ -63,7 +62,7 @@ GlobalFunc.getInstance().Deebug("UpdateList() ci " + centerIndex + " iscroll " +
if (bRecenterSelection || iPlatform != 0) {
iSelectedIndex = centerIndex;
- iHighlightedIndex = centerIndex; // faB++
+ iHighlightedIndex = centerIndex; //fabd++
}
for (var i = centerIndex; i < EntriesA.length && iListItemsShown < iMaxItemsShown && listCumulativeHeight <= fListHeight; i++) {
@@ -84,9 +83,9 @@ GlobalFunc.getInstance().Deebug("UpdateList() ci " + centerIndex + " iscroll " +
GetClipByIndex(i).itemIndex = undefined;
}
- // we no longer do this since we always scroll around the center item
+ //fabd-- we no longer do this since we always scroll around the center item
/*if (!bRecenterSelection) {
- // faB: moved to function below
+ // moved to function below
SetSelectedIndexByMouse(true);
}*/
@@ -102,7 +101,7 @@ GlobalFunc.getInstance().Deebug("UpdateList() ci " + centerIndex + " iscroll " +
{
for (var target: Object = Mouse.getTopMostEntity(); target != undefined; target = target._parent) {
if (target._parent == this && target._visible && target.itemIndex != undefined) {
-GlobalFunc.getInstance().Deebug("SetSelectedIndexByMouse() " + target.itemIndex);
+//GlobalFunc.getInstance().Deebug("SetSelectedIndexByMouse() " + target.itemIndex);
doSetSelectedIndex(target.itemIndex, 0, abMouseHighlight);
}
}
@@ -127,10 +126,9 @@ GlobalFunc.getInstance().Deebug("SetSelectedIndexByMouse() " + target.itemIndex)
}
// iSelectedIndex = -1;
- // iHighlightedIndex = -1; //faB++
// bRecenterSelection = true;
- /*faB-- disabled because we always want the selection to be the center
+ /*fabd-- disabled because we always want the selection to be the center
for (var target: Object = Mouse.getTopMostEntity(); target && target != undefined; target = target._parent) {
if (target == this) {
bRecenterSelection = false;
@@ -166,7 +164,7 @@ GlobalFunc.getInstance().Deebug("SetSelectedIndexByMouse() " + target.itemIndex)
function SetSelectedTopic(aiTopicIndex: Number): Void
{
-GlobalFunc.getInstance().Deebug("SetSelectedTopic() " + aiTopicIndex);
+//GlobalFunc.getInstance().Deebug("SetSelectedTopic() " + aiTopicIndex);
iSelectedIndex = 0;
iScrollPosition = 0;
View
6 src/dialoguemenu/DialogueMenu.as
@@ -74,7 +74,7 @@ class DialogueMenu extends MovieClip
SpeakerName.verticalAutoSize = "top";
SpeakerName.SetText(" ");
- GlobalFunc.getInstance().Deebug("DialogueMenu::InitExtensions() done.");
+// GlobalFunc.getInstance().Deebug("DialogueMenu::InitExtensions() done.");
}
function AdjustForPALSD(): Void
@@ -95,7 +95,7 @@ class DialogueMenu extends MovieClip
function handleInput(details: InputDetails, pathToFocus: Array): Boolean
{
-GlobalFunc.getInstance().Deebug("handleInput() DialogueMenu");
+//GlobalFunc.getInstance().Deebug("handleInput() DialogueMenu");
if (bFadedIn && GlobalFunc.IsKeyPressed(details)) {
if (details.navEquivalent == NavigationCode.TAB) {
onCancelPress();
@@ -259,7 +259,7 @@ GlobalFunc.getInstance().Deebug("handleInput() DialogueMenu");
// If it's a mouse click, set the selected index now
if (abMouseClick) {
TopicList.SetSelectedIndexByMouse(false);
- GlobalFunc.getInstance().Deebug("now selectedIndex = " + TopicList.selectedIndex);
+// GlobalFunc.getInstance().Deebug("now selectedIndex = " + TopicList.selectedIndex);
}
if (eMenuState == DialogueMenu.TOPIC_LIST_SHOWN) {

0 comments on commit 3277b7f

Please sign in to comment.