mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-24 10:38:02 +02:00
Added Dialog.GenerateClipboardText to fix About version info copy
This commit is contained in:
parent
34c6ca9a1a
commit
cd3052e418
2 changed files with 15 additions and 14 deletions
|
@ -322,6 +322,11 @@ namespace Beefy.widgets
|
||||||
mDefaultButton.MouseClicked(0, 0, 0, 0, 3);
|
mDefaultButton.MouseClicked(0, 0, 0, 0, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual void GenerateClipboardText(String outText)
|
||||||
|
{
|
||||||
|
outText.AppendF("{}\n{}", mTitle, mText);
|
||||||
|
}
|
||||||
|
|
||||||
void WindowKeyDown(KeyDownEvent evt)
|
void WindowKeyDown(KeyDownEvent evt)
|
||||||
{
|
{
|
||||||
if ((evt.mKeyCode != .Alt) && (mWidgetWindow.IsKeyDown(.Alt)) && (!mWidgetWindow.IsKeyDown(.Control)))
|
if ((evt.mKeyCode != .Alt) && (mWidgetWindow.IsKeyDown(.Alt)) && (!mWidgetWindow.IsKeyDown(.Control)))
|
||||||
|
@ -402,10 +407,12 @@ namespace Beefy.widgets
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var clipboardText = scope String();
|
var clipboardText = GenerateClipboardText(.. scope String());
|
||||||
clipboardText.AppendF("{}\n{}", mTitle, mText);
|
if (!clipboardText.IsEmpty)
|
||||||
BFApp.sApp.SetClipboardText(clipboardText, "");
|
{
|
||||||
evt.mHandled = true;
|
BFApp.sApp.SetClipboardText(clipboardText, "");
|
||||||
|
evt.mHandled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,17 +238,11 @@ namespace IDE.ui
|
||||||
MarkDirty();
|
MarkDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void KeyDown(KeyCode keyCode, bool isRepeat)
|
|
||||||
{
|
|
||||||
base.KeyDown(keyCode, isRepeat);
|
|
||||||
|
|
||||||
if ((keyCode == (.)'C') && (mWidgetWindow.GetKeyFlags(true) == .Ctrl))
|
public override void GenerateClipboardText(String outText)
|
||||||
{
|
{
|
||||||
String versionInfo = scope String();
|
outText.AppendF("Beef IDE Version {}", gApp.mVersionInfo.FileVersion);
|
||||||
versionInfo.AppendF("Beef IDE Version {}", gApp.mVersionInfo.FileVersion);
|
outText.AppendF(" Build {}", gApp.mVersionInfo.ProductVersion);
|
||||||
versionInfo.AppendF(" Build {}", gApp.mVersionInfo.ProductVersion);
|
|
||||||
gApp.SetClipboardText(versionInfo);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue