Exemple #1
0
 public void createScreens()
 {
     sf = new ScriptFunctions(mod, this);
     pfa = new PathFinderAreas(mod);
     screenParty = new ScreenParty(mod, this);
     screenInventory = new ScreenInventory(mod, this);
     screenItemSelector = new ScreenItemSelector(mod, this);
     screenPcSelector = new ScreenPcSelector(mod, this);
     screenJournal = new ScreenJournal(mod, this);
     screenShop = new ScreenShop(mod, this);
     screenCastSelector = new ScreenCastSelector(mod, this);
     screenConvo = new ScreenConvo(mod, this);
     logicTreeRun = new LogicTreeRun(mod, this);
     screenCombat = new ScreenCombat(mod, this);
     screenMainMap = new ScreenMainMap(mod, this);
     screenTitle = new ScreenTitle(mod, this);
     screenPcCreation = new ScreenPcCreation(mod, this);
     screenSpellLevelUp = new ScreenSpellLevelUp(mod, this);
     screenTraitLevelUp = new ScreenTraitLevelUp(mod, this);
     screenLauncher = new ScreenLauncher(mod, this);
     screenPartyBuild = new ScreenPartyBuild(mod, this);
     screenPartyRoster = new ScreenPartyRoster(mod,this);
 }
Exemple #2
0
        //public bool logUpdated = false;
        //public int drawCount = 0;
        //public int mouseCount = 0;
        public GameView()
        {
            InitializeComponent();
            this.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.GameView_MouseWheel);
            mainDirectory = Directory.GetCurrentDirectory();

            this.IceBlinkButtonClose.setupAll(this);
            this.IceBlinkButtonResize.setupAll(this);
            try
            {
                playerButtonClick.SoundLocation = mainDirectory + "\\default\\NewModule\\sounds\\btn_click.wav";
                playerButtonClick.Load();
            }
            catch (Exception ex) { MessageBox.Show(ex.ToString()); }
            try
            {
                playerButtonEnter.SoundLocation = mainDirectory + "\\default\\NewModule\\sounds\\btn_hover.wav";
                playerButtonEnter.Load();
            }
            catch (Exception ex) { MessageBox.Show(ex.ToString()); }

            this.WindowState = FormWindowState.Maximized;
            this.Width = 1366;
            this.Height = 768;
            screenWidth = this.Width; //getResources().getDisplayMetrics().widthPixels;
            screenHeight = this.Height; //getResources().getDisplayMetrics().heightPixels;
            float sqrW = (float)screenWidth / (float)squaresInWidth;
            float sqrH = (float)screenHeight / (float)squaresInHeight;
            if (sqrW > sqrH)
            {
                squareSize = (int)(sqrH);
            }
            else
            {
                squareSize = (int)(sqrW);
            }
            if ((squareSize > 100) && (squareSize < 120))
            {
                squareSize = 100;
            }
            screenDensity = (float)squareSize / (float)squareSizeInPixels;
            oXshift = (screenWidth - (squareSize * squaresInWidth)) / 2;

            //CREATES A FONTFAMILY
            //(LOOK THE out word in the parameter sent to the method, that will modify myFonts object)
            family = LoadFontFamily(mainDirectory + "\\default\\NewModule\\fonts\\Metamorphous-Regular.ttf", out myFonts);
            float multiplr = (float)squareSize / 100.0f;
            drawFontLarge = new Font(family, 24.0f * multiplr);
            drawFontReg = new Font(family, 20.0f * multiplr);
            drawFontSmall = new Font(family, 16.0f * multiplr);

            animationTimer.Tick += new System.EventHandler(this.AnimationTimer_Tick);
            floatyTextTimer.Tick += new System.EventHandler(this.FloatyTextTimer_Tick);
            floatyTextMainMapTimer.Tick += new System.EventHandler(this.FloatyTextMainMapTimer_Tick);

            cc = new CommonCode(this);
            mod = new Module();

            log = new IbbHtmlLogBox(this, 0 * squareSize + oXshift - 3, 0 * squareSize + oYshift, 6 * squareSize, 7 * squareSize);
            log.numberOfLinesToShow = 20;
            cc.addLogText("red", "screenDensity: " + screenDensity);
            cc.addLogText("fuchsia", "screenWidth: " + screenWidth);
            cc.addLogText("lime", "screenHeight: " + screenHeight);
            cc.addLogText("yellow", "squareSize: " + squareSize);
            cc.addLogText("yellow", "sqrW: " + sqrW);
            cc.addLogText("yellow", "sqrH: " + sqrH);
            cc.addLogText("yellow", "");
            cc.addLogText("red", "Welcome to IceBlink 2");
            cc.addLogText("fuchsia", "You can scroll this message log box, use mouse wheel or scroll bar");

            //TODOinitializeMusic();
            //TODOinitializeCombatMusic();

            if (fixedModule.Equals("")) //this is the IceBlink Engine app
            {
                screenLauncher = new ScreenLauncher(mod, this);
                screenLauncher.loadModuleFiles();
                screenType = "launcher";
            }
            else //this is a fixed module
            {
                mod = cc.LoadModule(fixedModule + "/" + fixedModule + ".mod", false);
                resetGame();
                cc.LoadSaveListItems();
                screenType = "title";
            }
        }