Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 30th, 2012  |  syntax: None  |  size: 2.28 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. if (_selections.length > 0){
  2.                                         selectionsY = string.y + string.height;
  3.                                         if (selectionGraphic.visible == false ){
  4.                                                 selectionGraphic.y = string.y + string.height;
  5.                                         }
  6.                                         selectionGraphic.visible = true;
  7.                                         for (var selectionsKey:String in _selections) {
  8.                                                 FlxG.state.add(selections = new FlxText(0,selectionsY,FlxG.width,_selections[selectionsKey]));
  9.                                                 selectionsY += 16;
  10.                                                 selections.alignment = "center";
  11.                                         }
  12.                                         if (FlxG.keys.justReleased("DOWN")){
  13.                                                 selectionKey += 1;
  14.                                                 selectionGraphic.y += 16;
  15.                                                 if (selectionKey > _selections.length-1){
  16.                                                         selectionGraphic.y = string.y + string.height;
  17.                                                         selectionKey = 0;
  18.                                                 }
  19.                                         }
  20.                                         if (FlxG.keys.justReleased("UP")){
  21.                                                 selectionGraphic.y -= 16;
  22.                                                 selectionKey -= 1;
  23.                                                 if (selectionKey < 0){
  24.                                                         selectionKey = _selections.length-1;
  25.                                                         selectionGraphic.y = string.y + string.height + 16*(_selections.length-1);
  26.                                                 }
  27.                                         }
  28.                                         if (FlxG.keys.justReleased("X")){
  29.                                                 selection = _selections[selectionKey];
  30.                                                 dialogBox = false;
  31.                                         }
  32.  
  33.                                 }