Wednesday, February 7, 2007

UIText

UIText is the GUI object used for containing and rendering text. It is one of the more complicated UI Objects to work with.

UIText takes the following attributes:

fontfamily
This defines which font should be used via a string argument. The fonts are defined in fontfamily.xml. The 'name' attribute for the different UIFontFamily elements in fontfamily.xml is how they are identified here. If this attribute is not set, then the text field will use the 'Default' font family defined in fontfamily.xml.

nextcontrol
Which control should have focus if the user hits tab while editing this UIText field. It only really makes sense to put UIText field names as the arguments to this attribute, as focus doesn't have any significant meaning for any other type of UIObject. Note that the nextcontrol must be in the same UIScene as this text field.

prevcontrol
Which control should have focus if the user hits shift+tab while editing this UIText field. It only really makes sense to put UIText field names as the arguments to this attribute, as focus doesn't have any significant meaning for any other type of UIObject. Note that the prevcontrol must be in the same UIScene as this text field.

filter
This attribute can be used to limit what text the user can enter into this text field when editing it. By default, any input character is valid. It takes strings as its arguments. The following strings are handled:
alpha - Only letters can be entered in this field.
numeric - Only numbers can be entered in this field.
alphanumeric - Only letters and numbers can be entered in this field.
signed_numeric - Only numbers in this field, except the '-' character, which may only be entered at the front of the string.

maxnumber
This number limits the max number that a user can enter when editing this text field. It only means anything if the text field's filter is set to numeric or signed_numeric.

allowspace
If this attribute is false, then any space characters will not be allowed in this field, including tabs or newlines. It defaults to false.

allowpunc
This attribute only means anything if the filter type is set to alpha or alphanumeric. It allows graphical punctuation characters to be entered in the text field. If no filter type is specified, then this attribute doesn't do anything. It defaults to false, so must be set to true if the intent is to allow users to enter punctuation style characters into this text field.

password
Defaults to false. If set to true, then the characters in this string will be replaced with * marks when this text field gets rendered.

sanitized
Defaults to false. If this attribute is set to true, then any string entered in this text field will be run through the built in swear-filter.

style
This is a modifier to the font that is being used. It takes a string or number as its argument. The following arguments are supported:
normal - Or style 1. This is defined by the UIFontNormal element in fontfamily.xml
bold - Or style 2. This is defined by the UIFontBold element in fontfamily.xml
italic - Or style 3. This is defined by the UIFontItalic element in fontfamily.xml
bolditalic - Or style 4. This is defined by the UIFontBoldItalic element in fontfamily.xml

indent
This is the number of pixels to indent the first line of any text. It defaults to 0.

hangingindent
This is the number of pixels to indent all lines besides the first line in a multi-line text field. It defaults to 0.

align
This is how the text should be aligned in the text field. The following string arguments are handled: left, right, center. Defaults to left.

hilite
Defaults to false. If set true, then the text in this text field will hilight when moused over.

valign
This is how the text should be aligned vertically within the text field. The following string arguments are handled: top, bottom, middle. Defaults to top.

poscenter
This attribute is defunct and no longer does anything.

sizetofit
Defaults to false. If set to true, then the text field will extend its height downward as far as possible in order to contain the length of text within it. This is an old attribute and should be replaced by just setting the height of the text field to DYNAMIC.

buttonoverlay
This only means anything if the text field is a child element of a UIButton element. If left to the default of false, then this text field will become the normal text field that shows up in buttons. If set to true, it becomes Overlay Text. At this time, Overlay Text can only be manipulated by the engine.

editable
Defaults to false. If set to true, then the user can edit the text within this text field by clicking it to place their cursor and typing like normal.

selectable
This attribute does nothing at this time.

maxlines
The max number of lines this text field can contain. Setting this attribute to '1' will keep the engine from trying to break the text into multiple lines. Text that will not fit into the text field after the maximum number of lines has been reached will not get rendered. If not defined, the engine will try to wrap a string and fit it into the space available no matter what, which can sometimes result in no text at all appearing due to spacing errors.

multiline
This attribute toggles whether or not a user can hit enter to start a new line of text within a editable text field. It requires that allowspaces be also set to true or else it will seem to do nothing. It defaults to false. When false, the OnReturn callback will get called when the user hits enter, instead of a new line being inserted.

returnrestricted
This attribute can be a bit confusing. It defaults to false and only means anything when used with multiline=true. What happens is that if this attribute is set to 'true', the text field will accept multiple lines of input and wrap them automatically, but if the user hits their return key, the OnReturn callback gets called instead of inserting a newline. An example of this behavior can be found in the chat input box.

uppercase
Defaults to false. If true, all text rendered in this text field will be rendered in uppercase.

maxlength
This limits the number of characters that can be typed into a text field by the user. Once the user has entered the max limit of characters, no additional characters can be input. If no maxlength is set, the user can keep typing indefinitely.

color
A color to blend with all of the characters within the text field. This can sometimes conflict with the use of the color tags in text fields.

highlightcolor
This attribute defines the color that should be blended with the text when doing a mouse-over style highlight.

selectioncolor
This attribute does nothing at this time.

highlightonmouseover
This is just a clone of the hilite attribute mentioned above.

text
This is for hard coding the text that should show up in this text field. Overrides strref.

strref
This is for coding which string ref should show up in the text field. It is overridden by text.

OnReturn
This callback gets executed when the user hits Enter while the cursor is in this text field. Note that if the text field is set with multiline=true and restrictedreturn=false, then this callback will not get executed.

OnLostFocus
This callback is executed when the cursor is taken out of the text field due to the user clicking elsewhere.

41 comments:

日本ダービー said...

第77回 日本ダービー 2010 予想、オッズ、厳選買い目は?人気が平然と馬券に絡む理由とは!?見事に展開を読んで結果を的中させる

出会い said...

エロセレブとの出会いを完全無料でご提供します。逆援助で高額報酬をゲットしよう

モバゲー said...

モバゲータウンでいろんな異性と交流を深めあいませんか。異性に対して経験がない方でも簡単にお楽しみいただける、シンプルかつ効率的に優れているサイトとなっています

ツイッター said...

全世界で大ブームを巻き起こしているツイッター!!それを利用して今まで経験したことがないような恋を経験してみませんか

モテる度チェッカー said...

モテる度チェッカーが今回リニューアルしました!!今迄と違い診断内容にモテない人と診断された方を救済する、速攻効果が出るモテる為のアドバイスが付きます、またモテる診断された人には、より一層のモテ・テクニックを手に入れませんか

安田記念 said...

第60回 安田記念 2010 予想 オッズ 出走馬 枠順で万馬券をズバリ的中!絶対なるデータが確実に当てるための秘訣

スタービーチ said...

スタービーチで素敵な愛を掴みませんか?愛に対する理想や想いを現実にしていきましょう

モバゲー said...

モバゲータウンでは今までとは一味違う出逢いを体験する事ができるのです。これまで良い出逢いがなかった人にはもってこいの無料登録型の掲示板です

ゲーマーチェッカー said...

ゲーマー達のステイタス、ゲーマーチェッカーであなたのゲーマー度数を測定!!測定結果を元に自分と同レベルのオンライン対戦も出来ます。ゲームが得意な人もそうでない人もどちらも楽しめますよ

スタービーチ said...

日本最大級のであいコミュニティ「スタービーチ」で恋人を探しませんか。素敵なであいを経験して理想の人と楽しい思い出を作りましょう

モバゲー said...

モバゲータウンでであいを楽しみませんか。気軽に誰でも楽しめるであいサイトとなっています。こんな事をしてみたいなど希望の事が実現できる、そんなであいコミュニティサイトです

出会い said...

エロセレブとの出会いを完全無料でご提供します。逆援助で高額報酬をゲットしよう

スタービーチ said...

スタービーチがどこのサイトよりも遊べる確率は高いんです。登録無料で新しい恋をGETしてみませんか

出会い said...

出会い系サイトで逆援助生活をしよう!エッチなセレブ女性たちが集まっています

玉の輿度チェッカー said...

今の時代簡単に金持ちになる方法は中々無いけど、可能性は誰しも秘めてます!!そう一番手っ取り早いのは玉の輿です。この玉の輿度チェッカーをキッカケに金持ちになった方が、意外と多いのです。是非あなたも一段高みを目指しませんか

出会い said...

一流セレブたちが出会いを求めて集まっています。彼女たちからの逆援助でリッチな生活を楽しみましょう

出会い系 said...

セレブの為の出会い系、セレブの雫では女性会員数も増え、男性会員様が不足するという状態となっております。そこで先着順に、男性会員様を募集しております

SM度チェッカー said...

最近普通のプレイに物足りなさを感じているそこのアナタ、ワンランク上のプレイをしてみませんか?そんな時の目安にSM度チェッカーを使うんです。自分の深層心理を暴きパートナーとのプレイ時のアドバイスも付きますよ!!一度どうですか

玉の輿度チェッカー said...

世の中手っ取り早く、簡単に金持ちに為ったもん勝ち!!そのためのツールが玉の輿度チェッカーです。心理カウンセラーを雇い、一人一人どうすれば人に好かれるか、最終的に結婚へのプロセスに持っていくかのアドバイスを期間限定で無料サービス中です。上手く玉の輿に乗っければ儲けもんです、一度試してみよう

mコミュ said...

素敵な出 会 いで愛を育む♪理想の人と楽しめる関係を築きませんか?mコミュでしか味わえない幸せを掴みましょう

スタービーチ said...

スタービーチで会える!?理想の異性をGETしよう☆素敵な出会いばかりだから求めている関係も作りやすい!!貴方が求めているのはどういった恋ですか?

名言チェッカー said...

他の人が言ってる名言や格言って良い事言ってるな~とか思ってる方、名言チェッカーで今日から自分に相応しい言葉を見つけませんか!!これでどんな人にも一目置かれる存在に為れますよ

mixi said...

mixiをも凌駕する出会い率!!出会いをするならここしかない♪mixiより出会えてしまうこのサイト。一度ハマれば辞めれません。スタービーチで素敵な出会いをしちゃいましょう

モバゲー said...

モバゲーで出会いをすれば楽しい事は間違いありません。暑いからこそ出会いを楽しむべきなのです。登録無料で簡単に利用可能!

モバゲータウン said...

モバゲータウンでは恋愛から出合いまでのキッカケをつかめる無料のコミュニティサイトです。常時サポートスタッフが掲示板をチェック、サクラや業者を排除しておりますので安心してご利用いただけます

スタビ said...

スタビが今一番アツイのはご存じでしょうか?夏休みで出会いを探している娘とすぐに会えちゃうんです。登録無料でここまで出会える所は他には存在しません。今登録して良いパートナーに巡り合おう

スタービーチ said...

出会いのシーズン、夏到来!スタービーチでご近所さんと知り合っちゃおう!ひと夏の体験も女の子は求めている

モバゲー said...

モバゲーでついに出会いができる!?楽しめる出会い、求めていた出会いはココから始まる。素敵な出会いでまずは関係づくりwしていきましょう

gree said...

greeで素敵な時間を過ごしたい・・・そんな願望を叶えてくれるサイト誕生!!今までにないドキドキ感と興奮をこのグリーで楽しみましょう

スタビ said...

スタビで出会いができる!!いつでもどこでも出会いが可能なスタービーチで最高の出会いをしてみませんか

mコミュ said...

簡単な出逢いはココでできる☆素敵な出逢いをmコミュで体験していきませんか?楽しめる出逢いを経験するならここしかない!!まずはお試しを

ツイッター said...

新時代突入!ツイッターで始まる出逢い…ここでしかできない出逢いが新しい風を巻き起こす!!素敵な巡りあわせを体験していこう!

SMチェッカー said...

あなたの秘められたSM度がわかるSMチェッカー!簡単な質問に答えるだけで自分の隠された部分が分かります!みんなで試してみよう

モバゲー said...

今やモバゲーは押しも押されもせぬ人気SNS!当然出 会いを求めてる人も多い!そこで男女が出 逢えるコミュニティーが誕生!ここなら友達、恋人が簡単にできちゃいますよ

モバゲー said...

もう夏休みも終わりに近づき、この夏最後の思い出を作りたいと焦ってる方が、モバゲーのコミュニティーに書かれてましたよ!!折角なんで夏の思い出作りに協力して自分も美味しい思いをしてみるのはどうですか?大手スポンサーサイトが付いてるので全部タダですよ

グリー said...

最近はどこのSNSサイトも規制ばっかりで、ちょっと出 合いに関して書き込みするとアク禁食らうけど、夏休み終盤に差し掛かり色々なサイトを調べた結果、グリーだけはどうも規制が緩んでるみたいです。今がチャンスの時期ですよ

ツイッター said...

ツイッターで出 合 いを求めるのです。気の合う異性と交流して楽しいひと時をお過ごしください。登録無料で使えるので気軽さは100点満点!

モテる度チェッカー said...

夏休みももう終わりに近づきこのまま一人は寂しいのちがう?そこでモテる度チェッカーを使い自分がなぜモテないか診断してもらいましょう。10~20代の女性アドバイザーが多数在籍してるので、アドバイスを参考に夏終盤を楽しもう

ixim said...

出会い専門コミュニティ【ixim】で素敵な出会いをしませんか?楽しめる出会いを当サイトが提供します!!

モテる度チェッカー said...

もう年末でお酒の席も増えてると思いますが、こんな時こそ自分のモテ度をさり気無くチェック出来るのが、モテる度チェッカーです。診断結果にはモテる為のアドバイス付き!!これで君もヤリチンの仲間入り

デコログ said...

今、本当に出会える掲示板はデコログ!密かに芸能人も愛用しているので友達になれちゃうかも!ガンガン出会えるデコログをぜひ一度ご利用ください!