コード例 #1
0
    public override void Start()
    {
        ShowTitle("Animated texts");

        _text=new FPseudoHtmlText(Config.fontFile,"<style text-color='#11FF11'><style text-scale='0.5'>Animated texts</style><br/><style text-scale='0.3'>FPseudoHtmlText and FLabelAnimate implement startVisibleCharIdx and endVisibleCharidx properties. They can be animated very simply with GoKit. How cool is that? <style text-color='#FF99FF'><br/><fsprite width='50' src='Monkey_0'/> It works with FSprites and FButtons of course, that's pretty cool! <fbutton src='YellowButton_normal' label='FButtons' scale='0.5' label-scale='0.5' color-down='#FF0000' action='MyMethodNameWithData' data='mybutttonid'/></style></style>",Config.textParams,Futile.screen.width-20f,PseudoHtmlTextAlign.left,1f,this);
        AddChild(_text);
        _text.endVisibleCharIdx=0;

        base.Start();

        TempMessage("Click to toggle text",2f);
    }
コード例 #2
0
    protected void TestSpeechBubbles(Vector2 touch)
    {
        if (_bubble!=null) {
            FSpeechBubbleManager.TransitionFadeOut(_bubble,0f);
        }
        FPseudoHtmlText text=new FPseudoHtmlText(Config.fontFile,"<style text-color='#111111'><style text-scale='0.5'>FSpeechBubble</style><br/><style text-scale='0.3'>Combined with a FPseudoHtmlText. How cool is that? <style text-color='#FF99FF'><br/><fsprite width='50' src='Monkey_0'/> With FSprites and FButtons inside, that's pretty cool! <fbutton src='YellowButton_normal' label='FButtons' scale='0.5' label-scale='0.5' color-down='#FF0000' action='MyMethodNameWithData' data='mybutttonid'/></style></style>",Config.textParams,200f,PseudoHtmlTextAlign.left,1f,this);
        //_bubble=FSpeechBubbleManager.Instance.Show(text,touch,10f);
        FSpeechBubbleManager.Instance.defaultContainer=this;
        _bubble=FSpeechBubbleManager.Instance.Show(text,touch,10f);
        FSpeechBubbleManager.TransitionPop(_bubble);

        //_back.MoveToFront();
    }
コード例 #3
0
 public FSpeechBubble Show(FPseudoHtmlText text,Vector2 point,float pointerMargin)
 {
     return Show(text,text.width,text.height,point,pointerMargin);
 }
コード例 #4
0
    private void HandleScrollButtonRelease(FButton button)
    {
        Debug.Log ("SCROLL BUTTON CLICK");

        FPseudoHtmlText text=new FPseudoHtmlText(Config.fontFile,"<style text-color='#111111'>Click!</style>",Config.textParams,100f,PseudoHtmlTextAlign.center,1f,this);
        FSpeechBubble bubble=FSpeechBubbleManager.Instance.Show(text,text.width,text.height,FSpeechBubbleManager.Instance.defaultContentMarginX,FSpeechBubbleManager.Instance.defaultContentMarginY,button.LocalToGlobal(Vector2.zero),FSpeechBubbleManager.Instance.defaultPointerLength,10f,FSpeechBubbleManager.Instance.defaultBackgroundColor,this,FSpeechBubbleManager.Instance.defaultVisibleArea);
        FSpeechBubbleManager.TransitionPop(bubble);
        FSpeechBubbleManager.TransitionFadeOut(bubble,1f);
    }