Skip to content

Commit

Permalink
IceStudio: XY Window tabs are now on top, and the XY Window tab now d…
Browse files Browse the repository at this point in the history
…isplays the map name, the editor window title no longer displays the map name.
  • Loading branch information
jmarshall23 committed Apr 4, 2020
1 parent 8e9368f commit a035832
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 73 deletions.
2 changes: 1 addition & 1 deletion code/framework/Licensee.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ If you have questions concerning this license or the applicable additional terms
// editor info
#define EDITOR_DEFAULT_PROJECT "doom.qe4"
#define EDITOR_REGISTRY_KEY "DOOMRadiant"
#define EDITOR_WINDOWTEXT "iceStudio"
#define EDITOR_WINDOWTEXT "iceStudio64"

// win32 info
#define WIN32_CONSOLE_CLASS "DOOM 3 WinConsole"
Expand Down
6 changes: 6 additions & 0 deletions code/tools/radiant.net/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ public static void InitRadiant(IntPtr ParentWindow)
// inspectorDialog.Show(nativeWindow);
}

[DllExport(CallingConvention = CallingConvention.Cdecl)]
public unsafe static void SetMapName(string mapName)
{
xyWndDialog.SetMapName(mapName);
}

[DllExport(CallingConvention = CallingConvention.Cdecl)]
public unsafe static IntPtr GetTexWndHandle()
{
Expand Down
139 changes: 69 additions & 70 deletions code/tools/radiant.net/Forms/XYWndDialog.Designer.cs

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

10 changes: 10 additions & 0 deletions code/tools/radiant.net/Forms/XYWndDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,15 @@ public IntPtr GetTexWndHWND()
{
return texWndPanel.Handle;
}

private void fileToolStripMenuItem_Click(object sender, EventArgs e)
{

}

public void SetMapName(string mapName)
{
xyWndTab.Text = "World Edit: " + mapName;
}
}
}
3 changes: 3 additions & 0 deletions code/tools/radiant.net/Forms/XYWndDialog.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,7 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
3 changes: 2 additions & 1 deletion code/tools/radiant.net/Radiant.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<OutputPath>..\..\..\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
Expand Down
Binary file not shown.
4 changes: 4 additions & 0 deletions code/tools/radiant/QE3.H
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ const float HUGE_DISTANCE = 100000;
struct RadiantNetInterface_t {
void(__cdecl *InitRadiant)(void *hwnd);
void(__cdecl *ShowEntitySelection)(const char *list);
void(__cdecl* SetMapName)(const char* list);

void(__cdecl *ToggleProgressDialog)(bool showDialog, const char *mapName, const char * workString, float completedPercent);
bool(__cdecl *ProgressBarUserCancaled)(void);
void(__cdecl *RedrawCameraWindow)();
Expand All @@ -90,6 +92,8 @@ struct RadiantNetInterface_t {
HWND(__cdecl *GetXYDialogHandle)();

HDC(__cdecl *GetTexWndHandle)();


};

extern RadiantNetInterface_t radiantNetInterface;
Expand Down
1 change: 1 addition & 0 deletions code/tools/radiant/Radiant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ void RadiantDotNetInit(void) {
radiantNetInterface.GetXYDialogHandle = (HWND(__cdecl *)(void))sys->DLL_GetProcAddress(g_radiant_net_dll, "GetXYDialogHandle");

radiantNetInterface.GetTexWndHandle = (HDC(__cdecl *)(void))sys->DLL_GetProcAddress(g_radiant_net_dll, "GetTexWndHandle");
radiantNetInterface.SetMapName = (void(__cdecl*)(const char *))sys->DLL_GetProcAddress(g_radiant_net_dll, "SetMapName");

HWND hwnd = g_pParentWnd->GetSafeHwnd();
radiantNetInterface.InitRadiant((void *)hwnd);
Expand Down
11 changes: 10 additions & 1 deletion code/tools/radiant/WIN_QE3.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,16 @@ void Sys_MarkMapModified(void) {
=======================================================================================================================
*/
void Sys_SetTitle(const char *text) {
g_pParentWnd->SetWindowText(va("%s: %s", EDITOR_WINDOWTEXT, text));
idStr mapName = text;

g_pParentWnd->SetWindowText(EDITOR_WINDOWTEXT);

if(mapName == "unnamed.map") {
radiantNetInterface.SetMapName("unnamed.map");
}
else {
radiantNetInterface.SetMapName(fileSystem->OSPathToRelativePath(text));
}
}

/*
Expand Down
Binary file modified radiant.net.dll
Binary file not shown.

0 comments on commit a035832

Please sign in to comment.