Skip to content

Commit

Permalink
Ресайз формы по Y
Browse files Browse the repository at this point in the history
  • Loading branch information
VaIeroK committed Jun 6, 2022
1 parent 25f4def commit 50c1ef9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 51 deletions.
10 changes: 8 additions & 2 deletions OGF tool/OgfEditor.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 0 additions & 49 deletions OGF tool/OgfEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ public partial class OGF_Editor : Form
public bool bKeyIsDown = false;
string number_mask = "";

// Elements Size
int FormHeight = 0;
int BoxesHeight = 0;
int TabControlHeight = 0;
int CreateButtonsHeight = 0;

[DllImport("converter.dll")]
private static extern int CSharpStartAgent(string path, string out_path, int mode, int convert_to_mode, string motion_list);

Expand All @@ -55,11 +49,6 @@ public OGF_Editor()
{
InitializeComponent();

FormHeight = Height;
BoxesHeight = MotionRefsBox.Height;
TabControlHeight = TabControl.Height;
CreateButtonsHeight = CreateMotionRefsButton.Height;

openFileDialog1.Filter = "OGF file|*.ogf";
saveFileDialog1.Filter = "OGF file|*.ogf|Object file|*.object|Bones file|*.bones|Skl file|*.skl|Skls file|*.skls";

Expand Down Expand Up @@ -324,42 +313,6 @@ private void CreateBoneTextBox(int idx, GroupBox box, string bone_name, string p
box.Controls.Add(RotationLabel);
}

private void RecalcFormSize(int set_size)
{
Height = FormHeight;
MotionRefsBox.Height = BoxesHeight;
UserDataBox.Height = BoxesHeight;
BoneNamesBox.Height = BoxesHeight;
MotionBox.Height = BoxesHeight;
TabControl.Height = TabControlHeight;
CreateMotionRefsButton.Height = CreateButtonsHeight;
CreateUserdataButton.Height = CreateButtonsHeight;

if (OGF_V.childs.Count <= 1)
{
set_size = 50;
Height -= set_size;
MotionRefsBox.Height -= set_size;
UserDataBox.Height -= set_size;
BoneNamesBox.Height -= set_size;
MotionBox.Height -= set_size;
TabControl.Height -= set_size;
CreateMotionRefsButton.Height -= set_size;
CreateUserdataButton.Height -= set_size;
}
else
{
Height += set_size;
MotionRefsBox.Height += set_size;
UserDataBox.Height += set_size;
BoneNamesBox.Height += set_size;
MotionBox.Height += set_size;
TabControl.Height += set_size;
CreateMotionRefsButton.Height += set_size;
CreateUserdataButton.Height += set_size;
}
}

private void Clear()
{
FILE_NAME = "";
Expand All @@ -381,8 +334,6 @@ private void AfterLoad()
SaveMenuParam.Enabled = true;
saveAsToolStripMenuItem.Enabled = true;

RecalcFormSize(125);

for (int i = 0; i < OGF_V.childs.Count; i++)
{
CreateTextureGroupBox(i);
Expand Down

0 comments on commit 50c1ef9

Please sign in to comment.