Ejemplo n.º 1
0
 public ScreenShop(Module m, GameView g)
 {
     mod = m;
     gv = g;
     setControlsStart();
     stringMessageShop = gv.cc.loadTextToString("data/MessageShop.txt");
 }
Ejemplo n.º 2
0
 public ScreenJournal(Module m, GameView g)
 {
     mod = m;
     gv = g;
     //journalBack = gv.cc.LoadBitmap("journalback"); // BitmapFactory.decodeResource(gv.getResources(), R.drawable.journalback);
     //setControlsStart();
 }
Ejemplo n.º 3
0
 public IbbHtmlTextBox(GameView g)
 {
     gv = g;
     fontfamily = gv.family;
     font = new Font(fontfamily, 20.0f * (float)gv.squareSize / 100.0f);
     //font = gv.drawFontReg;
     brush.Color = Color.Red;
 }
Ejemplo n.º 4
0
 public ScreenParty(Module m, GameView g)
 {
     mod = m;
     gv = g;
     setControlsStart();
     description = new IbbHtmlTextBox(gv, 320, 100, 500, 300);
     description.showBoxBorder = false;
 }
Ejemplo n.º 5
0
 public ScreenTraitLevelUp(Module m, GameView g)
 {
     mod = m;
     gv = g;
     setControlsStart();
     pc = new Player();
     stringMessageTraitLevelUp = gv.cc.loadTextToString("data/MessageTraitLevelUp.txt");
 }
Ejemplo n.º 6
0
 public ScreenCombat(Module m, GameView g)
 {
     mod = m;
     gv = g;
     mapStartLocXinPixels = 6 * gv.squareSize;
     setControlsStart();
     setToggleButtonsStart();
 }
Ejemplo n.º 7
0
 public ScreenPcCreation(Module m, GameView g)
 {
     mod = m;
     gv = g;
     blankItemSlot = gv.cc.LoadBitmap("item_slot");
     setControlsStart();
     LoadPlayerBitmapList();
     CreateRaceList();
     resetPC();
 }
Ejemplo n.º 8
0
 public IbbHtmlTextBox(GameView g, int locX, int locY, int width, int height)
 {
     gv = g;
     fontfamily = gv.family;
     font = new Font(fontfamily, 20.0f * (float)gv.squareSize / 100.0f);
     //font = gv.drawFontReg;
     tbXloc = locX;
     tbYloc = locY;
     tbWidth = width;
     tbHeight = height;
     brush.Color = Color.Red;
 }
Ejemplo n.º 9
0
 public ScreenLauncher(Module m, GameView g)
 {
     mod = m;
     gv = g;
     setControlsStart();
     int pH = (int)((float)gv.screenHeight / 100.0f);
     description = new IbbHtmlTextBox(gv);
     description.tbXloc = 0 * gv.squareSize + gv.oXshift;
     description.tbYloc = 6 * gv.squareSize + gv.oYshift;
     description.tbWidth = 16 * gv.squareSize;
     description.tbHeight = 6 * gv.squareSize;
     description.showBoxBorder = false;
 }
Ejemplo n.º 10
0
        //The following are the keywords used:
        //if
        //else
        //endif
        //
        //for
        //continue
        //break
        //next
        //
        //goto
        //label
        //
        //gosub
        //subroutine
        //return
        //
        //msg
        //Variable types and the prefix used:
        //@ = float or integer (stored as float and converted to int if needed)
        //$ = string
        //% = the prefix for a data object property ( ex. %item[@i].name )
        //~ = the prefix for a function call ( ex. ~gaTakeItem() )
        //# = the prefix for the number of elements in a data object List ( ex. #ItemList )
        public IBScriptEngine(GameView g, string filename, string prm1, string prm2, string prm3, string prm4)
        {
            gv = g;
            //read in script file and create line numbered list
            lines = File.ReadAllLines(gv.cc.GetModulePath() + "\\ibscript\\" + filename + ".ibs");
            List<string> converttolist = lines.ToList();
            converttolist.Insert(0, "//line 0");
            lines = converttolist.ToArray();

            //set-up Block lists
            fillForBlocksList();
            fillIfBlocksList();

            //RunScript();
        }
Ejemplo n.º 11
0
 public ItemListSelector(GameView g, List<string> itList, string headertxt)
 {
     InitializeComponent();
     this.IceBlinkButtonClose.setupAll(g);
     this.IceBlinkButtonResize.setupAll(g);
     this.IceBlinkButtonClose.Visible = false;
     this.IceBlinkButtonClose.Enabled = false;
     this.IceBlinkButtonResize.Visible = false;
     this.IceBlinkButtonResize.Enabled = false;
     gv = g;
     HeaderText = headertxt;
     this.label1.Font = gv.drawFontReg;
     this.label1.Text = headertxt;
     itemList = itList;
     ResizeWindow();
     CreateButtons();
 }
Ejemplo n.º 12
0
 public TextInputDialog(GameView g, string headertxt)
 {
     InitializeComponent();
     this.IceBlinkButtonClose.setupAll(g);
     this.IceBlinkButtonResize.setupAll(g);
     this.IceBlinkButtonClose.Visible = false;
     this.IceBlinkButtonClose.Enabled = false;
     this.IceBlinkButtonResize.Visible = false;
     this.IceBlinkButtonResize.Enabled = false;
     gv = g;
     btnReturn.Text = "RETURN";
     btnReturn.Font = gv.drawFontReg;
     HeaderText = headertxt;
     this.label1.Font = gv.drawFontReg;
     this.label1.Text = headertxt;
     txtInput.Font = gv.drawFontReg;
 }
Ejemplo n.º 13
0
 public IBHtmlMessageBox(GameView g, string htmlstring)
 {
     InitializeComponent();
     gv = g;
     button1.Text = "RETURN";
     button1.Font = gv.drawFontReg;
     this.IceBlinkButtonClose.Enabled = false;
     this.IceBlinkButtonResize.Enabled = false;
     this.IceBlinkButtonClose.Visible = false;
     this.IceBlinkButtonResize.Visible = false;
     this.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.form_MouseWheel);
     hlb = new IbbHtmlLogBox(this, gv, 10, 30, 580, 400);
     hlb.AddHtmlTextToLog(htmlstring);
     hlb.numberOfLinesToShow = 16;
     hlb.AddHtmlTextToLog("");
     hlb.currentTopLineIndex = 0;
     //hlb.scrollToEnd();
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Show method (which is overloaded) is used to display the message.
 /// This is a static method so we don't need to create an
 /// object of this class to call this method.
 /// </summary>
 /// <param name="messageText">Message which needs to be displayed to user.</param>
 public static DialogResult Show(GameView gv, string messageText)
 {
     IBMessageBox frmMessage = new IBMessageBox();
     frmMessage.IceBlinkButtonResize.setupAll(gv);
     frmMessage.IceBlinkButtonResize.Enabled = false;
     frmMessage.IceBlinkButtonResize.Visible = false;
     //frmMessage.IceBlinkButtonClose.Enabled = false;
     //frmMessage.IceBlinkButtonClose.Visible = false;
     frmMessage.IceBlinkButtonClose.setupAll(gv);
     frmMessage.setupAll(gv);
     frmMessage.lblMessageText.Font = gv.drawFontReg;
     frmMessage.BackColor = Color.Black;
     frmMessage.ForeColor = Color.White;
     frmMessage.setMessage(messageText);
     frmMessage.setBoxSize(messageText);
     frmMessage.addButton(gv, enumMessageButton.OK);
     frmMessage.StartPosition = FormStartPosition.CenterScreen;
     DialogResult dr = frmMessage.ShowDialog();
     return dr;
 }
Ejemplo n.º 15
0
 public IbbPortrait(GameView g, float sc)
 {
     gv     = g;
     scaler = sc;
 }
Ejemplo n.º 16
0
        public void Update(int elapsed, GameView gv)
        {
            //float xMod = (gv.screenWidth / 1920f);
            //float yMod = (gv.screenHeight / 1080f);
            timeToLiveInMilliseconds -= elapsed;
            totalElapsedTime         += elapsed;
            if (movementMethod == "linear")
            {
                position += velocity * elapsed * (gv.squareSize / 71f);
                //todo tst, expand
                //position.X += velocity.X * elapsed * xMod;
                //position.Y += velocity.Y * elapsed * yMod;
                angle += angularVelocity * elapsed;
            }
            else if (movementMethod == "clouds")
            {
                position += velocity * elapsed * 0.9f * (gv.squareSize / 71f);
                gv.cc.transformSpritePixelPositionOnContactWithVisibleMainMapBorders(this, 1, true, false, 0);
                opacity = gv.mod.fullScreenEffectOpacityWeather;
            }
            else if (movementMethod == "fog")
            {
                position += velocity * elapsed * (gv.squareSize / 71f);
                //scheissbrille4
                //gv.cc.transformSpritePixelPositionOnContactWithVisibleMainMapBorders(this, 0.5f, false, true, 0);
                gv.cc.transformSpritePixelPositionOnContactWithVisibleMainMapBorders(this, 1.2f, true, false, 0);
                opacity = gv.mod.fullScreenEffectOpacityWeather;
            }
            else if (movementMethod == "rain")
            {
                position += velocity * elapsed * 1.275f * (gv.squareSize / 71f);
                //gv.cc.transformSpritePixelPositionOnContactWithVisibleMainMapBorders(this, 1.0f, true, false, 0);
                opacity = gv.mod.fullScreenEffectOpacityWeather;
            }
            else if (movementMethod == "snow")
            {
                position += velocity * elapsed * 1.1f * (gv.squareSize / 71f);
                float shiftAdder = gv.sf.RandInt(300);
                float limitAdder = gv.sf.RandInt(300);

                if (!reverseXShift)
                {
                    xShift = xShift + 0.02f - 0.005f + (shiftAdder / 10000);
                }
                if (xShift >= (0.85 + (limitAdder / 1000)))
                {
                    reverseXShift = true;
                }
                if (reverseXShift)
                {
                    xShift = xShift - 0.02f + 0.005f - (shiftAdder / 10000);
                }
                if (xShift <= (-0.85 - (limitAdder / 1000)))
                {
                    reverseXShift = false;
                }

                position.X += (xShift * 0.75f) * (elapsed / 30f) * (gv.squareSize / 71f);
                //old approach with sin, doing it via customized values like above for now
                //position.X += (float)Math.Sin(position.Y);
                //gv.cc.transformSpritePixelPositionOnContactWithVisibleMainMapBorders(this, 25.0f, true, false, 0);
                opacity = gv.mod.fullScreenEffectOpacityWeather;
            }
            else if (movementMethod == "sandstorm")
            {
                position += velocity * elapsed * 1.4f * (gv.squareSize / 71f);
                opacity   = gv.mod.fullScreenEffectOpacityWeather;
            }

            if (this.numberOFFramesForAnimationsMadeFromSeveralBitmaps > 0)
            {
                numberOfFrames = this.numberOFFramesForAnimationsMadeFromSeveralBitmaps;
            }
            //note: wonder whether this works with changes in IB2...
            if (numberOfFrames == 0)
            {
                numberOfFrames = 1;
            }
            if (numberOFFramesForAnimationsMadeFromSeveralBitmaps == 0)
            {
                int x = totalElapsedTime % (numberOfFrames * millisecondsPerFrame);
                currentFrameIndex = x / millisecondsPerFrame;
            }
            else
            {
                int x = (totalElapsedTime % (numberOfFrames * millisecondsPerFrame));
                currentFrameIndex = (x / millisecondsPerFrame) + 1;
            }
            //if ((this.movementMethod == "lightning") && (currentFrameIndex == 1))

            //{
            //int stop = 0;
            //}
        }
Ejemplo n.º 17
0
 public ScreenCastSelector(Module m, GameView g)
 {
     //mod = m;
     gv = g;
     stringMessageCastSelector = gv.cc.loadTextToString("data/MessageCastSelector.txt");
 }
Ejemplo n.º 18
0
        /// <summary>
        /// This method is used to add button(s) on the message box.
        /// </summary>
        /// <param name="MessageButton">MessageButton is type of enumMessageButton
        /// through which determines the types of button which need to be displayed.</param>
        private void addButton(GameView gv, enumMessageButton MessageButton)
        {
            switch (MessageButton)
            {
            case enumMessageButton.OK:
            {
                IceBlinkButtonMedium btnOk = new IceBlinkButtonMedium();
                btnOk.setupAll(gv);
                btnOk.Text         = "";
                btnOk.TextIB       = "OK";
                btnOk.Font         = gv.drawFontReg;
                btnOk.DialogResult = DialogResult.OK;
                //btnOk.FlatStyle = FlatStyle.Popup;
                //btnOk.FlatAppearance.BorderSize = 0;
                btnOk.SetBounds((this.ClientSize.Width / 2) - 40, this.ClientSize.Height - 35, 85, 25);
                this.Controls.Add(btnOk);
            }
            break;

            case enumMessageButton.OKCancel:
            {
                IceBlinkButtonMedium btnOk = new IceBlinkButtonMedium();
                btnOk.setupAll(gv);
                btnOk.Text         = "";
                btnOk.TextIB       = "OK";
                btnOk.Font         = gv.drawFontReg;
                btnOk.DialogResult = DialogResult.OK;
                //btnOk.FlatStyle = FlatStyle.Popup;
                //btnOk.FlatAppearance.BorderSize = 0;
                btnOk.SetBounds((this.ClientSize.Width / 2) - 85, this.ClientSize.Height - 35, 85, 25);
                this.Controls.Add(btnOk);

                IceBlinkButtonMedium btnCancel = new IceBlinkButtonMedium();
                btnCancel.setupAll(gv);
                btnCancel.Text         = "";
                btnCancel.TextIB       = "CANCEL";
                btnCancel.Font         = gv.drawFontReg;
                btnCancel.DialogResult = DialogResult.Cancel;
                //btnCancel.FlatStyle = FlatStyle.Popup;
                //btnCancel.FlatAppearance.BorderSize = 0;
                btnCancel.SetBounds((this.ClientSize.Width / 2) + 5, this.ClientSize.Height - 35, 85, 25);
                this.Controls.Add(btnCancel);
            }
            break;

            case enumMessageButton.YesNo:
            {
                IceBlinkButtonMedium btnNo = new IceBlinkButtonMedium();
                btnNo.setupAll(gv);
                btnNo.Text         = "";
                btnNo.TextIB       = "NO";
                btnNo.Font         = gv.drawFontReg;
                btnNo.DialogResult = DialogResult.No;
                //btnNo.FlatStyle = FlatStyle.Popup;
                //btnNo.FlatAppearance.BorderSize = 0;
                btnNo.SetBounds((this.ClientSize.Width / 2) + 5, this.ClientSize.Height - 35, 85, 25);
                this.Controls.Add(btnNo);

                IceBlinkButtonMedium btnYes = new IceBlinkButtonMedium();
                btnYes.setupAll(gv);
                btnYes.Text         = "";
                btnYes.TextIB       = "YES";
                btnYes.Font         = gv.drawFontReg;
                btnYes.DialogResult = DialogResult.Yes;
                //btnYes.FlatStyle = FlatStyle.Popup;
                //btnYes.FlatAppearance.BorderSize = 0;
                btnYes.SetBounds((this.ClientSize.Width / 2) - 85, this.ClientSize.Height - 35, 85, 25);
                this.Controls.Add(btnYes);
            }
            break;
            }
        }
Ejemplo n.º 19
0
 public ScreenTitle(Module m, GameView g)
 {
     //gv.mod = m;
     gv = g;
     setControlsStart();
 }
Ejemplo n.º 20
0
 public IB2Portrait(GameView g)
 {
     gv = g;
 }
Ejemplo n.º 21
0
 public void setupAll(GameView gv)
 {
     loadSounds(gv);
     loadButtonImages(gv);
 }
Ejemplo n.º 22
0
 public IbbToggleButton(GameView g)
 {
     gv = g;
     //gameContext = gmContext;
 }
Ejemplo n.º 23
0
 public ScreenCastSelector(Module m, GameView g)
 {
     mod = m;
     gv = g;
     stringMessageCastSelector = gv.cc.loadTextToString("data/MessageCastSelector.txt");
 }
Ejemplo n.º 24
0
 public ScreenJournal(Module m, GameView g)
 {
     //gv.mod = m;
     gv = g;
 }
Ejemplo n.º 25
0
 private void loadSounds(GameView gv)
 {
     try
        {
        if (gv.mod != null)
        {
            if (File.Exists(gv.mainDirectory + "\\modules\\" + gv.mod.moduleName + "\\sounds\\btn_click.wav"))
            {
                playerButtonClick.SoundLocation = gv.mainDirectory + "\\modules\\" + gv.mod.moduleName + "\\sounds\\btn_click.wav";
            }
            else
            {
                playerButtonClick.SoundLocation = gv.mainDirectory + "\\default\\NewModule\\sounds\\btn_click.wav";
            }
        }
        else
        {
            playerButtonClick.SoundLocation = gv.mainDirectory + "\\default\\NewModule\\sounds\\btn_click.wav";
        }
        }
        catch { }
        try
        {
        if (gv.mod != null)
        {
            if (File.Exists(gv.mainDirectory + "\\modules\\" + gv.mod.moduleName + "\\sounds\\btn_hover.wav"))
            {
                playerButtonEnter.SoundLocation = gv.mainDirectory + "\\modules\\" + gv.mod.moduleName + "\\sounds\\btn_hover.wav";
            }
            else
            {
                playerButtonEnter.SoundLocation = gv.mainDirectory + "\\default\\NewModule\\sounds\\btn_hover.wav";
            }
        }
        else
        {
            playerButtonEnter.SoundLocation = gv.mainDirectory + "\\default\\NewModule\\sounds\\btn_hover.wav";
        }
        }
        catch (Exception ex) { MessageBox.Show(ex.ToString()); }
 }
Ejemplo n.º 26
0
 private void loadButtonImages(GameView gv)
 {
     try
        {
        if (gv.mod != null)
        {
            if (File.Exists(gv.mainDirectory + "\\modules\\" + gv.mod.moduleName + "\\ui\\btn_close_normal.png"))
            {
                this.BackgroundImage = (Image)new Bitmap(gv.mainDirectory + "\\modules\\" + gv.mod.moduleName + "\\ui\\btn_large.png");
                this.HoverImage = (Image)new Bitmap(gv.mainDirectory + "\\modules\\" + gv.mod.moduleName + "\\ui\\btn_large_on.png");
                this.NormalImage = (Image)new Bitmap(gv.mainDirectory + "\\modules\\" + gv.mod.moduleName + "\\ui\\btn_large.png");
                this.PressedImage = (Image)new Bitmap(gv.mainDirectory + "\\modules\\" + gv.mod.moduleName + "\\ui\\btn_large_on.png");
            }
            else
            {
                this.BackgroundImage = (Image)new Bitmap(gv.mainDirectory + "\\default\\NewModule\\ui\\btn_large.png");
                this.HoverImage = (Image)new Bitmap(gv.mainDirectory + "\\default\\NewModule\\ui\\btn_large_on.png");
                this.NormalImage = (Image)new Bitmap(gv.mainDirectory + "\\default\\NewModule\\ui\\btn_large.png");
                this.PressedImage = (Image)new Bitmap(gv.mainDirectory + "\\default\\NewModule\\ui\\btn_large_on.png");
            }
        }
        else
        {
            this.BackgroundImage = (Image)new Bitmap(gv.mainDirectory + "\\default\\NewModule\\ui\\btn_large.png");
            this.HoverImage = (Image)new Bitmap(gv.mainDirectory + "\\default\\NewModule\\ui\\btn_large_on.png");
            this.NormalImage = (Image)new Bitmap(gv.mainDirectory + "\\default\\NewModule\\ui\\btn_large.png");
            this.PressedImage = (Image)new Bitmap(gv.mainDirectory + "\\default\\NewModule\\ui\\btn_large_on.png");
        }
        }
        catch { }
 }
Ejemplo n.º 27
0
 public void setupAll(GameView g)
 {
     loadSounds(g);
        loadButtonImages(g);
 }
Ejemplo n.º 28
0
        public void Draw(GameView gv)
        {
            IbRect src = new IbRect(currentFrameIndex * frameHeight, 0, frameHeight, frameHeight);
            IbRect dst = new IbRect(0, 0, 0, 0);

            //assumes frames of equal proportions
            if (numberOFFramesForAnimationsMadeFromSeveralBitmaps != 0)
            {
                src = new IbRect(0, 0, 150, 150);
            }

            /*
             * if (gv.screenType.Equals("combat"))
             * {
             *  int randXInt = gv.sf.RandInt(500);
             *  float randX = randXInt / 10000f;
             *  int decider = gv.sf.RandInt(2);
             *  if (decider == 1)
             *  {
             *      randX = -1 * randX;
             *  }
             *
             *  int randYInt = gv.sf.RandInt(500);
             *  float randY = randXInt / 10000f;
             *  decider = gv.sf.RandInt(2);
             *  if (decider == 1)
             *  {
             *      randY = -1 * randY;
             *  }
             *
             *  dst = new IbRect((int)this.position.X, (int)(this.position.Y + randY), (int)((gv.squareSize * this.scaleX) + randX), (int)(gv.squareSize * this.scaleY));
             * }
             * else
             * {
             */
            //snowshift
            dst = new IbRect((int)this.position.X, (int)this.position.Y, (int)(gv.squareSize * this.scaleX), (int)(gv.squareSize * this.scaleY));
            //}

            //panikanfälle
            if (gv.screenType == "combat")
            {
                if (!gv.screenCombat.isPlayerTurn)
                {
                    Creature cr = new Creature();
                    int      highestLivingCrtMoveOrderfound = 0;
                    foreach (Creature c in gv.mod.currentEncounter.encounterCreatureList)
                    {
                        if (gv.screenCombat.currentMoveOrderIndex == 0)
                        {
                            if (c.moveOrder >= highestLivingCrtMoveOrderfound)
                            {
                                highestLivingCrtMoveOrderfound = c.moveOrder;
                                cr = c;
                            }
                        }
                        else
                        {
                            if (c.moveOrder == gv.screenCombat.currentMoveOrderIndex - 1)
                            {
                                cr = c;
                                break;
                            }
                        }
                    }

                    dst = new IbRect((int)this.position.X - (int)cr.glideAdderX, (int)this.position.Y - (int)cr.glideAdderY, (int)(gv.squareSize * this.scaleX), (int)(gv.squareSize * this.scaleY));
                }
            }
            float opacityMulti = 1;

            if (this.movementMethod.Contains("fog") || this.movementMethod.Contains("clouds"))
            {
                opacityMulti = 0.64f;
            }

            if (numberOFFramesForAnimationsMadeFromSeveralBitmaps == 0)
            {
                //if (this.movementMethod == "fog")
                //{
                //gv.DrawBitmapParallelToPlayer(gv.cc.GetFromBitmapList(bitmap), src, dst, angle, false, this.opacity * opacityMulti);
                //}

                if (this.movementMethod == "clouds")
                {
                    bool mirror = false;
                    if (this.mass == 1)
                    {
                        mirror = true;
                    }
                    gv.DrawBitmap(gv.cc.GetFromBitmapList(bitmap), src, dst, angle, mirror, this.opacity * opacityMulti);
                }
                else
                {
                    gv.DrawBitmap(gv.cc.GetFromBitmapList(bitmap), src, dst, angle, false, this.opacity * opacityMulti);
                }
            }
            else
            {
                //gv.cc.addLogText("red", currentFrameIndex.ToString());

                gv.DrawBitmap(gv.cc.GetFromBitmapList(bitmap + currentFrameIndex.ToString()), src, dst, angle, false, this.opacity * opacityMulti);
            }
        }
Ejemplo n.º 29
0
 public IbbToggleButton(GameView g)
 {
     gv = g;
     //gameContext = gmContext;
 }
Ejemplo n.º 30
0
 public IB2Panel(GameView g)
 {
     gv          = g;
     currentLocX = shownLocX;
     currentLocY = shownLocY;
 }
Ejemplo n.º 31
0
 public IbbButton(GameView g, float sc)
 {
     gv     = g;
     scaler = sc;
 }
Ejemplo n.º 32
0
 public void  setupIB2Portrait(GameView g)
 {
     gv = g;
 }
Ejemplo n.º 33
0
 public CommonCode(GameView g)
 {
     gv = g;
 }
Ejemplo n.º 34
0
 public ScreenTitle(Module m, GameView g)
 {
     mod = m;
     gv = g;
     setControlsStart();
 }
Ejemplo n.º 35
0
 public void loadAreas(GameView gv)
 {
     foreach (string areaName in this.moduleAreasList)
     {
         try
         {
             using (StreamReader file = File.OpenText(gv.mainDirectory + "\\modules\\" + this.moduleName + "\\areas\\" + areaName + ".lvl"))
             {
                 JsonSerializer serializer = new JsonSerializer();
                 Area newArea = (Area)serializer.Deserialize(file, typeof(Area));
                 foreach (Prop p in newArea.Props)
                 {
                     p.initializeProp();
                 }
                 moduleAreasObjects.Add(newArea);
             }
         }
         catch (Exception ex)
         {
             //exception out
         }
     }
 }
Ejemplo n.º 36
0
 public ScreenPcSelector(Module m, GameView g)
 {
     //gv.mod = m;
     gv = g;
     setControlsStart();
 }
Ejemplo n.º 37
0
 public ScreenItemSelector(Module m, GameView g)
 {
     mod = m;
     gv = g;
     //setControlsStart();
 }
Ejemplo n.º 38
0
        /// <summary>
        /// This method is used to add button(s) on the message box.
        /// </summary>
        /// <param name="MessageButton">MessageButton is type of enumMessageButton
        /// through which determines the types of button which need to be displayed.</param>
        private void addButton(GameView gv, enumMessageButton MessageButton)
        {
            switch (MessageButton)
            {
                case enumMessageButton.OK:
                    {
                        IceBlinkButtonMedium btnOk = new IceBlinkButtonMedium();
                        btnOk.setupAll(gv);
                        btnOk.Text = "";
                        btnOk.TextIB = "OK";
                        btnOk.Font = gv.drawFontReg;
                        btnOk.DialogResult = DialogResult.OK;
                        //btnOk.FlatStyle = FlatStyle.Popup;
                        //btnOk.FlatAppearance.BorderSize = 0;
                        btnOk.SetBounds((this.ClientSize.Width / 2) - 40, this.ClientSize.Height - 35, 85, 25);
                        this.Controls.Add(btnOk);
                    }
                    break;
                case enumMessageButton.OKCancel:
                    {
                        IceBlinkButtonMedium btnOk = new IceBlinkButtonMedium();
                        btnOk.setupAll(gv);
                        btnOk.Text = "";
                        btnOk.TextIB = "OK";
                        btnOk.Font = gv.drawFontReg;
                        btnOk.DialogResult = DialogResult.OK;
                        //btnOk.FlatStyle = FlatStyle.Popup;
                        //btnOk.FlatAppearance.BorderSize = 0;
                        btnOk.SetBounds((this.ClientSize.Width / 2) - 85, this.ClientSize.Height - 35, 85, 25);
                        this.Controls.Add(btnOk);

                        IceBlinkButtonMedium btnCancel = new IceBlinkButtonMedium();
                        btnCancel.setupAll(gv);
                        btnCancel.Text = "";
                        btnCancel.TextIB = "CANCEL";
                        btnCancel.Font = gv.drawFontReg;
                        btnCancel.DialogResult = DialogResult.Cancel;
                        //btnCancel.FlatStyle = FlatStyle.Popup;
                        //btnCancel.FlatAppearance.BorderSize = 0;
                        btnCancel.SetBounds((this.ClientSize.Width / 2) + 5, this.ClientSize.Height - 35, 85, 25);
                        this.Controls.Add(btnCancel);
                    }
                    break;
                case enumMessageButton.YesNo:
                    {
                        IceBlinkButtonMedium btnNo = new IceBlinkButtonMedium();
                        btnNo.setupAll(gv);
                        btnNo.Text = "";
                        btnNo.TextIB = "NO";
                        btnNo.Font = gv.drawFontReg;
                        btnNo.DialogResult = DialogResult.No;
                        //btnNo.FlatStyle = FlatStyle.Popup;
                        //btnNo.FlatAppearance.BorderSize = 0;
                        btnNo.SetBounds((this.ClientSize.Width / 2) + 5, this.ClientSize.Height - 35, 85, 25);
                        this.Controls.Add(btnNo);

                        IceBlinkButtonMedium btnYes = new IceBlinkButtonMedium();
                        btnYes.setupAll(gv);
                        btnYes.Text = "";
                        btnYes.TextIB = "YES";
                        btnYes.Font = gv.drawFontReg;
                        btnYes.DialogResult = DialogResult.Yes;
                        //btnYes.FlatStyle = FlatStyle.Popup;
                        //btnYes.FlatAppearance.BorderSize = 0;
                        btnYes.SetBounds((this.ClientSize.Width / 2) - 85, this.ClientSize.Height - 35, 85, 25);
                        this.Controls.Add(btnYes);
                    }
                    break;
            }
        }
Ejemplo n.º 39
0
 private void loadHeaderImage(GameView gv)
 {
     try
     {
         if (gv.mod != null)
         {
             if (File.Exists(gv.mainDirectory + "\\modules\\" + gv.mod.moduleName + "\\ui\\btn_lrg_header.png"))
             {
                 this.pnlTitle.BackgroundImage = (Image)new Bitmap(gv.mainDirectory + "\\modules\\" + gv.mod.moduleName + "\\ui\\btn_lrg_header.png");
             }
             else
             {
                 this.pnlTitle.BackgroundImage = (Image)new Bitmap(gv.mainDirectory + "\\default\\NewModule\\ui\\btn_lrg_header.png");
             }
         }
         else
         {
             this.pnlTitle.BackgroundImage = (Image)new Bitmap(gv.mainDirectory + "\\default\\NewModule\\ui\\btn_lrg_header.png");
         }
     }
     catch { }
 }
Ejemplo n.º 40
0
 public IbbButton(GameView g, float sc)
 {
     gv = g;
     scaler = sc;
 }
Ejemplo n.º 41
0
 public ScreenPortraitSelector(Module m, GameView g)
 {
     //gv.mod = m;
     gv = g;
 }
Ejemplo n.º 42
0
 public void setCurrentArea(string filename, GameView gv)
 {
     try
     {
         foreach (Area area in this.moduleAreasObjects)
         {
             if (area.Filename.Equals(filename))
             {
                 this.currentArea = area;
                 gv.cc.bmpMap = gv.cc.LoadBitmap(this.currentArea.ImageFileName);
                 foreach (Prop p in this.currentArea.Props)
                 {
                     p.token = gv.cc.LoadBitmap(p.ImageFileName);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         //exception out
     }
 }
Ejemplo n.º 43
0
 public ScreenTokenSelector(Module m, GameView g)
 {
     //gv.mod = m;
     gv = g;
 }
Ejemplo n.º 44
0
 public void setupAll(GameView gv)
 {
     loadHeaderImage(gv);
     //this.IBBorderInsideColor = gv.module.ModuleTheme.IBBorderInsideColor;
     //this.IBBorderMiddleColor = gv.module.ModuleTheme.IBBorderMiddleColor;
     //this.IBBorderOutsideColor = gv.module.ModuleTheme.IBBorderOutsideColor;
 }
Ejemplo n.º 45
0
 public ScriptFunctions(Module m, GameView g)
 {
     mod = m;
     gv = g;
     rand = new Random();
 }