mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Small fixes
This commit is contained in:
parent
4a809f3364
commit
4f2472c276
5 changed files with 62 additions and 22 deletions
18
IDE/dist/BeefConfig_install.toml
vendored
18
IDE/dist/BeefConfig_install.toml
vendored
|
@ -1,7 +1,15 @@
|
||||||
[Registry.minlib]
|
|
||||||
Version = "1.0.0"
|
|
||||||
Location = { Path = "../mintest/minlib" }
|
|
||||||
|
|
||||||
[Registry.corlib]
|
[Registry.corlib]
|
||||||
Version = "1.0.0"
|
Version = "1.0.0"
|
||||||
Location = { Path = "../corlib" }
|
Location = { Path = "../BeefLibs/corlib" }
|
||||||
|
|
||||||
|
[Registry.SDL2]
|
||||||
|
Version = "1.0.0"
|
||||||
|
Location = { Path = "../BeefLibs/SDL2" }
|
||||||
|
|
||||||
|
[Registry.MiniZ]
|
||||||
|
Version = "1.0.0"
|
||||||
|
Location = { Path = "../BeefLibs/MiniZ" }
|
||||||
|
|
||||||
|
[Registry.Beefy2D]
|
||||||
|
Version = "1.0.0"
|
||||||
|
Location = { Path = "../BeefLibs/Beefy2D" }
|
|
@ -1694,6 +1694,22 @@ namespace IDE.ui
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!gApp.mWorkspace.IsInitialized)
|
||||||
|
{
|
||||||
|
String projPath = scope .();
|
||||||
|
Path.GetDirectoryPath(filePath, projPath);
|
||||||
|
projPath.Concat(Path.DirectorySeparatorChar, "BeefSpace.toml");
|
||||||
|
gApp.OpenWorkspace(projPath);
|
||||||
|
|
||||||
|
for (let project in gApp.mWorkspace.mProjects)
|
||||||
|
{
|
||||||
|
if (Path.Equals(project.mProjectPath, filePath))
|
||||||
|
return project;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
bool failed = false;
|
bool failed = false;
|
||||||
String projName = scope String();
|
String projName = scope String();
|
||||||
Path.GetFileNameWithoutExtension(filePath, projName);
|
Path.GetFileNameWithoutExtension(filePath, projName);
|
||||||
|
@ -1729,8 +1745,15 @@ namespace IDE.ui
|
||||||
fileDialog.Title = "Import Project";
|
fileDialog.Title = "Import Project";
|
||||||
fileDialog.Multiselect = false;
|
fileDialog.Multiselect = false;
|
||||||
|
|
||||||
var initialDir = scope String(IDEApp.sApp.mWorkspace.mDir);
|
var initialDir = scope String();
|
||||||
//initialDir.Replace('/', '\\');
|
if (gApp.mWorkspace.mDir != null)
|
||||||
|
initialDir.Append(gApp.mWorkspace.mDir);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (gApp.mInstallDir.Length > 0)
|
||||||
|
Path.GetDirectoryPath(.(gApp.mInstallDir, 0, gApp.mInstallDir.Length - 1), initialDir);
|
||||||
|
initialDir.Concat(Path.DirectorySeparatorChar, "Samples");
|
||||||
|
}
|
||||||
|
|
||||||
fileDialog.InitialDirectory = initialDir;
|
fileDialog.InitialDirectory = initialDir;
|
||||||
fileDialog.ValidateNames = true;
|
fileDialog.ValidateNames = true;
|
||||||
|
|
|
@ -93,8 +93,9 @@ namespace IDE.ui
|
||||||
|
|
||||||
void ResizeComponents()
|
void ResizeComponents()
|
||||||
{
|
{
|
||||||
mConfigComboBox.Resize(mWidth - GS!(440), 0, GS!(120), mHeight + 2);
|
int btnLeft = gApp.mSettings.mEnableDevMode ? GS!(380) : GS!(300);
|
||||||
mPlatformComboBox.Resize(mWidth - GS!(440 + 120), 0, GS!(120), mHeight + 2);
|
mConfigComboBox.Resize(mWidth - btnLeft, 0, GS!(120), mHeight + 2);
|
||||||
|
mPlatformComboBox.Resize(mWidth - btnLeft - GS!(120), 0, GS!(120), mHeight + 2);
|
||||||
|
|
||||||
if (mCancelSymSrvButton != null)
|
if (mCancelSymSrvButton != null)
|
||||||
mCancelSymSrvButton.Resize(GS!(546), 0, GS!(20), GS!(20));
|
mCancelSymSrvButton.Resize(GS!(546), 0, GS!(20), GS!(20));
|
||||||
|
@ -239,20 +240,22 @@ namespace IDE.ui
|
||||||
int32 column;
|
int32 column;
|
||||||
sourceViewPanel.GetCursorPosition(out line, out column);
|
sourceViewPanel.GetCursorPosition(out line, out column);
|
||||||
|
|
||||||
/*if (true)
|
/*var ewc = sourceViewPanel.mEditWidget.Content;
|
||||||
|
int cursorPos = ewc.CursorTextPos;
|
||||||
|
if (cursorPos < ewc.mData.mTextLength)
|
||||||
{
|
{
|
||||||
var ewc = sourceViewPanel.mEditWidget.Content;
|
ewc.mData.mTextIdData.Prepare();
|
||||||
int cursorPos = ewc.CursorTextPos;
|
g.DrawString(StackStringFormat!("Id {0}", ewc.mData.mTextIdData.GetIdAtIndex(cursorPos)), mWidth - GS!(310), 0);
|
||||||
if (cursorPos < ewc.mData.mTextLength)
|
|
||||||
{
|
|
||||||
ewc.mData.mTextIdData.Prepare();
|
|
||||||
g.DrawString(StackStringFormat!("Id {0}", ewc.mData.mTextIdData.GetIdAtIndex(cursorPos)), mWidth - GS!(320), 0);
|
|
||||||
}
|
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
g.DrawString(StackStringFormat!("Idx {0}", sourceViewPanel.mEditWidget.Content.CursorTextPos), mWidth - GS!(240), 0);
|
|
||||||
g.DrawString(StackStringFormat!("Ln {0}", line + 1), mWidth - GS!(160), 0);
|
/*line = 8'888'888;
|
||||||
g.DrawString(StackStringFormat!("Col {0}", column + 1), mWidth - GS!(80), 0);
|
column = 8'888'888;*/
|
||||||
|
|
||||||
|
if (gApp.mSettings.mEnableDevMode)
|
||||||
|
g.DrawString(StackStringFormat!("Idx {0}", sourceViewPanel.mEditWidget.Content.CursorTextPos), mWidth - GS!(240), 0);
|
||||||
|
g.DrawString(StackStringFormat!("Ln {0}", line + 1), mWidth - GS!(150), 0);
|
||||||
|
g.DrawString(StackStringFormat!("Col {0}", column + 1), mWidth - GS!(78), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
using (g.PushColor(0xFF101010))
|
using (g.PushColor(0xFF101010))
|
||||||
|
|
|
@ -2,6 +2,7 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Diagnostics;
|
||||||
namespace IDE.util
|
namespace IDE.util
|
||||||
{
|
{
|
||||||
class ResourceGen
|
class ResourceGen
|
||||||
|
@ -77,7 +78,6 @@ namespace IDE.util
|
||||||
}
|
}
|
||||||
|
|
||||||
let iconDir = Try!(stream.Read<IconDir>());
|
let iconDir = Try!(stream.Read<IconDir>());
|
||||||
|
|
||||||
if ((iconDir.mReserved != 0) || (iconDir.mType != 1) || (iconDir.mCount > 0x100))
|
if ((iconDir.mReserved != 0) || (iconDir.mType != 1) || (iconDir.mCount > 0x100))
|
||||||
{
|
{
|
||||||
gApp.OutputErrorLine("Invalid file format: {0}", iconFile);
|
gApp.OutputErrorLine("Invalid file format: {0}", iconFile);
|
||||||
|
@ -97,6 +97,12 @@ namespace IDE.util
|
||||||
|
|
||||||
Try!(stream.Seek(iconEntry.mImageOffset));
|
Try!(stream.Seek(iconEntry.mImageOffset));
|
||||||
|
|
||||||
|
if (iconEntry.mBytesInRes > 1024*1024)
|
||||||
|
{
|
||||||
|
gApp.OutputErrorLine("Invalid icon entry in: {0}", iconFile);
|
||||||
|
return .Err;
|
||||||
|
}
|
||||||
|
|
||||||
uint8* data = new:ScopedAlloc! uint8[iconEntry.mBytesInRes]*;
|
uint8* data = new:ScopedAlloc! uint8[iconEntry.mBytesInRes]*;
|
||||||
|
|
||||||
Try!(stream.TryRead(.(data, iconEntry.mBytesInRes)));
|
Try!(stream.TryRead(.(data, iconEntry.mBytesInRes)));
|
||||||
|
|
|
@ -12502,5 +12502,5 @@ void WdAllocTest()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif //!defined BF32 || !defined BF_DBG_64
|
#endif //!defined BF32 || !defined BF_DBG_64
|
||||||
//ab
|
|
Loading…
Add table
Add a link
Reference in a new issue