Beispiel #1
0
        public ImageUnitPaletteForm()
        {
            InitializeComponent();
            SetExplain();
            this.UNITCLASS_LIST.OwnerDraw(ListBoxEx.DrawUnitAndClassAndText, DrawMode.OwnerDrawFixed);
            if (Program.ROM.RomInfo.version() == 8)
            {
                this.UNITCLASS_LIST.ItemListToJumpForm("UNITPALETTEFE8", new string[] { "UID" });
            }
            else
            {
                this.UNITCLASS_LIST.ItemListToJumpForm("UNIT");
            }

            this.InputFormRef = Init(this);
            this.InputFormRef.AddressListExpandsEvent += AddressListExpandsEventNoCopyP12;
            this.InputFormRef.MakeGeneralAddressListContextMenu(true);

            this.PaletteZoomComboBox.SelectedIndex  = 0;
            this.PaletteIndexComboBox.SelectedIndex = 0;
            this.PFR = new PaletteFormRef(this);
            PFR.MakePaletteUI(OnChangeColor, GetSampleBitmap);

            U.SetIcon(ExportButton, Properties.Resources.icon_arrow);
            U.SetIcon(ImportButton, Properties.Resources.icon_upload);
        }
Beispiel #2
0
        private void MapStyleEditorForm_Load(object sender, EventArgs e)
        {
            IsInit = true;

            //マップIDリストを作る.
            List <U.AddrResult> maplist = MapSettingForm.MakeMapIDList();

            //マップスタイルリストを作る
            this.MapEditConf = MapEditorForm.MakeMapStyleList(maplist);
            //マップスタイルリストを作る
            MakeMapStyleCombo();

            U.SelectedIndexSafety(this.MapStyle, 0);

            List <U.AddrResult> terrainList = MapTerrainNameForm.MakeList();

            U.ConvertComboBox(terrainList, ref this.ConfigTerrain);

            //マップオブジェクト
            this.MAP.SetChipSize(8);
            Bitmap black = ImageUtil.BlankDummy();

            U.MakeTransparent(black);
            this.MAP.SetDefaultIcon(black);

            //パレット
            this.PFR = new PaletteFormRef(this);
            PFR.MakePaletteUI(OnChangeColor, GetSampleBitmap);
            U.SelectedIndexSafety(this.PaletteCombo, 0);

            //TSA変更のイベント適応.
            List <Control> controls = InputFormRef.GetAllControls(this);

            InputFormRef.MakeLinkEvent("Config_", controls);


            //最大化禁止
            //C#のバグである Anchorを四隅にすると、スクロールバーが消えるというバグに対処するために、
            //フォームを固定化しないとおかしなことになる。
            //クレームは microsoft あたりまでどうぞ.
            this.MaximizeBox = false;
            IsInit           = false;

            U.AllowDropFilename(this, ImageFormRef.IMAGE_FILE_FILTER, (string filename) =>
            {
                using (ImageFormRef.AutoDrag ad = new ImageFormRef.AutoDrag(filename))
                {
                    ObjImportButton_Click(null, null);
                }
            });
            U.AllowDropFilename(this, new string[] { ".MAPCHIP_CONFIG" }, (string filename) =>
            {
                using (ImageFormRef.AutoDrag ad = new ImageFormRef.AutoDrag(filename))
                {
                    MapChipImportButton_Click(null, null);
                }
            });
        }
 public ImageBattleAnimePalletForm()
 {
     InitializeComponent();
     this.PaletteZoomComboBox.SelectedIndex  = 0;
     this.PaletteIndexComboBox.SelectedIndex = 0;
     this.Is32ColorMode = false;
     this.PFR           = new PaletteFormRef(this);
     PFR.MakePaletteUI(OnChangeColor, GetSampleBitmap);
     SetExpain();
 }
Beispiel #4
0
        private void BattleScreenForm_Load(object sender, EventArgs e)
        {
            ClearUndoBuffer();

            uint palette = Program.ROM.p32(Program.ROM.RomInfo.battle_screen_palette_pointer());

            U.ForceUpdate(PALETTE_ADDRESS, palette);
            this.PFR = new PaletteFormRef(this);
            PFR.MakePaletteUI(OnChangeColor, GetSampleBitmap);
            this.PaletteIndexComboBox.SelectedIndex = 0;

            InitLoadChipsetInfo();
            LoadChipsetInfo();  //チップセット関係の読込
            LoadBattleScreen(); //ROM TSAをメモリに読み込んで
            SetupTileAddr();
//            MakeBattleScreen(); //TSA描画
            Zoom.SelectedIndex = 1; //2倍拡大
        }
Beispiel #5
0
        public ImageBattleAnimePalletForm()
        {
            InitializeComponent();
            this.PaletteZoomComboBox.SelectedIndex  = 0;
            this.PaletteIndexComboBox.SelectedIndex = 0;
            this.Is32ColorMode = false;
            this.PFR           = new PaletteFormRef(this);
            PFR.MakePaletteUI(OnChangeColor, GetSampleBitmap);
            SetExpain();

            U.AllowDropFilename(this, new string[] { ".PNG" }, (string filename) =>
            {
                using (ImageFormRef.AutoDrag ad = new ImageFormRef.AutoDrag(filename))
                {
                    this.ImportButton_Click(null, null);
                }
            });
        }