Beispiel #1
0
 private void InitDesktop()
 {
     if (desktop != null && sprites != null)
     {
         return;
     }
     this.desktop = new Desktop(this, GetWidth(), GetHeight());
     this.sprites = new Sprites(GetWidth(), GetHeight());
     if (dialog == null)
     {
         LImage tmp = LImage.CreateImage(GetWidth() - 20,
     GetHeight() / 2 - 20, true);
         LGraphics g = tmp.GetLGraphics();
         g.SetColor(0, 0, 0, 125);
         g.FillRect(0, 0, tmp.GetWidth(), tmp.GetHeight());
         g.Dispose();
         g = null;
         dialog = new LTexture(GLLoader.GetTextureData(tmp));
         if (tmp != null)
         {
             tmp.Dispose();
             tmp = null;
         }
     }
     this.message = new LMessage(dialog, 0, 0);
     this.message.SetFontColor(LColor.white);
     int size = message.GetWidth() / (message.GetMessageFont().GetSize());
     if (LSystem.scaleWidth != 1 || LSystem.scaleHeight != 1)
     {
         if (size % 2 != 0)
         {
             size = size + 2;
         }
         else
         {
             size = size + 3;
         }
     }
     else
     {
         if (size % 2 != 0)
         {
             size = size - 3;
         }
         else
         {
             size = size - 4;
         }
     }
     this.message.SetMessageLength(size);
     this.message.SetLocation((GetWidth() - message.GetWidth()) / 2,
             GetHeight() - message.GetHeight() - 10);
     this.message.SetVisible(false);
     this.select = new LSelect(dialog, 0, 0);
     this.select.SetLocation(message.X(), message.Y());
     this.scrCG = new AVGCG();
     this.desktop.Add(message);
     this.desktop.Add(select);
     this.select.SetVisible(false);
 }
Beispiel #2
0
 public abstract void InitMessageConfig(LMessage message);
Beispiel #3
0
 public void SetMessage(LMessage message)
 {
     this.message = message;
 }
Beispiel #4
0
        private void InitRole()
        {
            role = new Picture(GetImage(11));
            mes = new LMessage(GetImage(14), (GetWidth() - 460) / 2,
                    GetHeight() - 126 - 10);
            mes.SetMessageLength(20);
            mes.SetAlpha(0.8f);
            mes.SetFontColor(LColor.black);
            mes.SetMessage(WAIT_MES);
            mes.Tag = this;
            mes.Click = new StartClick();
            Add(role);
            Add(mes);

        }
Beispiel #5
0
 public _Runnable(LLKScreen s, LMessage m)
 {
     this.screen = s;
     this.message = m;
 }
Beispiel #6
0
 private void InitDesktop()
 {
     if (desktop != null && sprites != null)
     {
         return;
     }
     this.desktop = new Desktop(this, GetWidth(), GetHeight());
     this.sprites = new Sprites(GetWidth(), GetHeight());
     if (dialog == null)
     {
         LPixmap g = new LPixmap(GetWidth() - 20,
                 GetHeight() / 2 - 20, true);
         g.SetAlphaValue(0, 0, 0, 125);
         g.FillRect(0, 0, g.GetWidth(), g.GetHeight());
         g.Dispose();
         dialog = g.Texture;
         g = null;
     }
     this.message = new LMessage(dialog, 0, 0);
     this.message.SetFontColor(LColor.white);
     int size = message.GetWidth() / (message.GetMessageFont().GetSize());
     if (LSystem.scaleWidth != 1 || LSystem.scaleHeight != 1)
     {
         if (size % 2 != 0)
         {
             size = size + 2;
         }
         else
         {
             size = size + 3;
         }
     }
     else
     {
         if (size % 2 != 0)
         {
             size = size - 3;
         }
         else
         {
             size = size - 4;
         }
     }
     this.message.SetMessageLength(size);
     this.message.SetLocation((GetWidth() - message.GetWidth()) / 2,
             GetHeight() - message.GetHeight() - 10);
     this.message.SetVisible(false);
     this.select = new LSelect(dialog, 0, 0);
     this.select.SetLocation(message.X(), message.Y());
     this.scrCG = new AVGCG();
     this.desktop.Add(message);
     this.desktop.Add(select);
     this.select.SetVisible(false);
 }
Beispiel #7
0
 public override void InitMessageConfig(LMessage message)
 {
 }