Ad
  
現: 2016-02-15 (月) 22:15:09 njf ソース 編集
Line 1: Line 1:
 +Feathersでテキスト入力をするにはTextInputを使う。
 + var wordInputTxt:TextInput = new TextInput();
 + wordInputTxt.width = 100;
 + wordInputTxt.height = 30;
 + 
 + addChild(wordInputTxt);
 +
 +フォントや字の大きさ、行よせなどを設定するときは、TextInputのプロパティであるtextEditorFactoryを設定する。
 +
 + wordInputTxt.textEditorFactory = function():ITextEditor
 + {
 +  var textEditor:StageTextTextEditor = new StageTextTextEditor();
 +  textEditor.styleProvider = null;
 +  textEditor.fontFamily = FONT_NAME;
 +  textEditor.textAlign = TextFormatAlign.CENTER;
 +  textEditor.fontSize = 24;
 +  textEditor.color = 0xFF0000;
 +  return textEditor;
 + }
 +
 +ここで使っているITexeEditorから派生したクラスStageTextTextEditorはモバイルアプリで推奨されている。デスクトップアプリではTextFieldTextEditorのほうが推奨されている。
  

  • Starling+Feathersでテキスト入力 のバックアップ差分(No. All)
    • 現: 2016-02-15 (月) 22:15:09 njf

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード印刷に適した表示   ページ新規作成 全ページ一覧 単語検索 最新ページの一覧   ヘルプ   最新ページのRSS 1.0 最新ページのRSS 2.0 最新ページのRSS Atom Powered by xpWiki
Counter: 1820, today: 1, yesterday: 0
MenuBar
広告

ログイン

ユーザー名:


パスワード:





パスワード紛失

Portuguese | English | German | Greek | Japanese | Korean | Russian | T-Chinese top
NJF