Skip to content

Commit c7eafda

Browse files
committed
git subrepo pull TextEditorExample/Data/Scripts/TextEditorExample/RichHudFramework
subrepo: subdir: "TextEditorExample/Data/Scripts/TextEditorExample/RichHudFramework" merged: "9eb595e" upstream: origin: "[email protected]:ZachHembree/RichHudFramework.Client.git" branch: "master" commit: "9eb595e" git-subrepo: version: "0.4.9" origin: "???" commit: "???"
1 parent 0640848 commit c7eafda

File tree

7 files changed

+68
-36
lines changed

7 files changed

+68
-36
lines changed

TextEditorExample/Data/Scripts/TextEditorExample/RichHudFramework/.gitrepo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[subrepo]
77
remote = [email protected]:ZachHembree/RichHudFramework.Client.git
88
branch = master
9-
commit = a96983f5bff320a15bd28c61679e5706f5da2289
10-
parent = 1e3e830a748a0871e347cc644b8e8b0ec412e762
9+
commit = 9eb595ec1f0d1f48a19fff39c68d4eef7ded2724
10+
parent = 0640848b954465d09a299371cee05d7b1eceef85
1111
method = merge
1212
cmdver = 0.4.9
Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,35 @@
11
## Rich HUD Framework
2-
This is a framework for creating custom retained-mode GUI in Space Engineers workshop mods using the billboards supplied by the mod API. It's nothing fancy, but it has most of the basic functionality you'd expect from a UI framework: text rendering, custom fonts, UI layering, key binds, mouse input, everything you might need to get started creating custom GUI in Space Engineers, sans markup lanugage. Everything is done in C#. If you want an idea of what that looks like, exactly, then have a look at some of the elements in the UI [library](https://github.com/ZachHembree/RichHudFramework.Client/blob/master/Shared/UI/HUD/HudElements/ClickableHudElements/Buttons/BorderedButton.cs); most of it's pretty straightforward.
32

4-
## Getting Started
5-
Space Engineer's mods are all compiled to independent assemblies with no references between them, for reasons I trust are apparent, but this has the obvious drawback of preventing any two mods from directly sharing code. Fortunately, the game does provide utilities for sharing data at runtime using types exposed by the game's mod API, like generic delegates and tuples. For this reason, this framework is split into three modules: Master, Client and Shared. The master module contains the implementation for things like the text renderer, bind manager, and manages the UI tree, among other things and the Client module provides wrappers and utilities that provide easy access to those systems.
3+
A retained-mode GUI framework for creating fully mod-defined UI in C# Space Engineers workshop mods. It enables the creation of scalable, resolution-independent, and fully interactive user interfaces using the game’s billboard system, in lieu of support in the mod API.
64

7-
To get started using this framework, you'll need to download a copy of the [client](https://github.com/ZachHembree/RichHudFramework.Client/releases) module from releases and include it in your mod. Usage details can be found in the [wiki](https://github.com/ZachHembree/RichHudFramework.Client/wiki), in addition to a detailed overview of the framework's functions.
5+
>See the [API reference](https://zachhembree.github.io/RichHudFramework.Client/index.html) for detailed overview, targeted examples and supplementary materials.
86
9-
## Demo
10-
If you want to get a better idea of what you can do with this framework, [Rich HUD Master](https://steamcommunity.com/workshop/filedetails/?id=1965654081) has a demo built into the terminal that can be enabled using the chat command "/rhd toggledebug". This demo allows you to spawn most of the UI elements in the library in their default state while also allowing you to maniplate their [HUD Space](https://github.com/ZachHembree/RichHudFramework.Client/wiki/HUD-Spaces) in real time.
7+
### Core Features
8+
- Persistent node-based UI tree with automatic depth sorting, input routing, and parent-child hierarchy
9+
- Full support for both screen-space (2D HUD) and world-space (3D) rendering
10+
- Custom bitmap text renderer supporting rich-text formatting, automatic wrapping, and runtime-loadable custom fonts
11+
- Centralized, serializable key-bind system with conflict groups, multiple aliases per bind, and automatic suppression of default game inputs
12+
- Shared, standardized mod settings terminal with ready-made pages, categories, and controls (sliders, checkboxes, dropdowns, key-rebind panels, rich-text help/changelog pages, etc.)
13+
- Library of pre-built, composable controls
1114

12-
![Demo menu screenshot](https://steamuserimages-a.akamaihd.net/ugc/1722038154210428899/17BC5D4D245402D3E642B36672DC840D1B7207D3/)
15+
### Mod Integration
1316

14-
## Example Mod
15-
You can find a well-documented example Text Editor Mod [here](https://github.com/ZachHembree/TextEditorExample). Fair warning, the corresponding walkthrough in the wiki is currently outdated, and I probably won't get around to finishing it for a while.
17+
The framework is split into three modules: **Master, Client, and Shared** because Space Engineers mods are compiled to independent assemblies. Data must be shared at runtime using common types and primitives.
18+
19+
* **Master Module:** The core logic (UI tree, text renderer, settings menu). This is the dependency that must be used on the Steam Workshop when publishing your mod.
20+
* **Client Module:** The developer-facing API. This is the module you directly integrate into your scripted C# mod.
21+
* **Shared Module:** Internal module. Common types and libraries duplicated in the other two modules.
22+
23+
To start, download a copy of the **Client module** from the [releases page](https://zachhembree.github.io/RichHudFramework.Client/Releases.html) and include it in your mod.
24+
25+
### Example Mod
26+
27+
A well-documented example **Text Editor Mod** is available [here](https://github.com/ZachHembree/TextEditorExample).
1628

1729
![Text editor screenshot](https://user-images.githubusercontent.com/6527038/117976888-3ffe4d80-b2fe-11eb-82f2-17c690fec3c5.png)
30+
31+
### Demo
32+
33+
[Rich HUD Master](https://steamcommunity.com/workshop/filedetails/?id=1965654081) includes a demo built into the terminal. You can enable it using the chat command `"/rhd toggledebug"`. This demo allows you to spawn most of the UI elements in the library in their default state while also allowing you to manipulate their [HUD Space](https://zachhembree.github.io/RichHudFramework.Client/articles/HUD-Spaces.html) in real time.
34+
35+
![Demo menu screenshot](https://steamuserimages-a.akamaihd.net/ugc/1722038154210428899/17BC5D4D245402D3E642B36672DC840D1B7207D3/)

TextEditorExample/Data/Scripts/TextEditorExample/RichHudFramework/RichHudClient.csproj

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,6 @@
3737
</PropertyGroup>
3838
<ItemGroup>
3939
<Reference Include="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
40-
<Reference Include="Sandbox.Common">
41-
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\Sandbox.Common.dll</HintPath>
42-
</Reference>
43-
<Reference Include="Sandbox.Game">
44-
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\Sandbox.Game.dll</HintPath>
45-
</Reference>
46-
<Reference Include="SpaceEngineers.Game">
47-
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\SpaceEngineers.Game.dll</HintPath>
48-
</Reference>
49-
<Reference Include="SpaceEngineers.ObjectBuilders">
50-
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\SpaceEngineers.ObjectBuilders.dll</HintPath>
51-
</Reference>
5240
<Reference Include="System" />
5341
<Reference Include="System.Core" />
5442
<Reference Include="System.Runtime.Serialization" />
@@ -57,24 +45,50 @@
5745
<Reference Include="Microsoft.CSharp" />
5846
<Reference Include="System.Data" />
5947
<Reference Include="System.Xml" />
48+
49+
<!--VRage References -->
50+
<Reference Include="Sandbox.Common">
51+
<HintPath>..\resources\bin\Sandbox.Common.dll</HintPath>
52+
<Private>False</Private>
53+
</Reference>
54+
<Reference Include="Sandbox.Game">
55+
<HintPath>..\resources\bin\Sandbox.Game.dll</HintPath>
56+
<Private>False</Private>
57+
</Reference>
58+
<Reference Include="SpaceEngineers.Game">
59+
<HintPath>..\resources\bin\SpaceEngineers.Game.dll</HintPath>
60+
<Private>False</Private>
61+
</Reference>
62+
<Reference Include="SpaceEngineers.ObjectBuilders">
63+
<HintPath>..\resources\bin\SpaceEngineers.ObjectBuilders.dll</HintPath>
64+
<Private>False</Private>
65+
</Reference>
6066
<Reference Include="VRage">
61-
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.dll</HintPath>
67+
<HintPath>..\resources\bin\VRage.dll</HintPath>
68+
<Private>False</Private>
6269
</Reference>
6370
<Reference Include="VRage.Game">
64-
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Game.dll</HintPath>
71+
<HintPath>..\resources\bin\VRage.Game.dll</HintPath>
72+
<Private>False</Private>
6573
</Reference>
6674
<Reference Include="VRage.Input">
67-
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Input.dll</HintPath>
75+
<HintPath>..\resources\bin\VRage.Input.dll</HintPath>
76+
<Private>False</Private>
6877
</Reference>
6978
<Reference Include="VRage.Library">
70-
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Library.dll</HintPath>
79+
<HintPath>..\resources\bin\VRage.Library.dll</HintPath>
80+
<Private>False</Private>
7181
</Reference>
7282
<Reference Include="VRage.Math">
73-
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Math.dll</HintPath>
83+
<HintPath>..\resources\bin\VRage.Math.dll</HintPath>
84+
<Private>False</Private>
7485
</Reference>
7586
<Reference Include="VRage.Render">
76-
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\SpaceEngineers\Bin64\VRage.Render.dll</HintPath>
87+
<HintPath>..\resources\bin\VRage.Render.dll</HintPath>
88+
<Private>False</Private>
7789
</Reference>
90+
<!--VRage References -->
91+
7892
</ItemGroup>
7993
<ItemGroup>
8094
<Compile Include="Client\RichHudClient.cs" />

TextEditorExample/Data/Scripts/TextEditorExample/RichHudFramework/Shared/.gitrepo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
[subrepo]
77
remote = [email protected]:ZachHembree/RichHudFramework.Shared.git
88
branch = master
9-
commit = f6fb68bcc02fe04e65bfec82c97fcd1c4a7f1888
9+
commit = 92acc3b644219e8308beea0750bdd8e2153dfe73
1010
method = merge
1111
cmdver = 0.4.9
12-
parent = d4dacddc6e6a2898d63339106da55497f042a67e
12+
parent = a281e3ab8b7ba6f47080554864d6baad6a48d8a3
1313

TextEditorExample/Data/Scripts/TextEditorExample/RichHudFramework/Shared/UI/HUD/HudElements/ClickableHudElements/TextBox.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public TextBox(HudParentBase parent) : base(parent)
130130
_bindInput = new BindInputElement(this)
131131
{
132132
InputPredicate = GetCanAllowInput,
133-
InputFilterFlags = SeBlacklistModes.Chat,
133+
InputFilter = SeBlacklistModes.Chat,
134134
CollectionInitializer =
135135
{
136136
{ SharedBinds.Copy, CopyText },

TextEditorExample/Data/Scripts/TextEditorExample/RichHudFramework/Shared/UI/HUD/HudElements/InputElements/BindInputElement.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class BindInputElement : HudNodeBase, IBindInput
4747
/// until the BintInputElement is disabled.
4848
/// <para>Uses <see cref="BindManager.RequestTempBlacklist(SeBlacklistModes)"/>.</para>
4949
/// </summary>
50-
public SeBlacklistModes InputFilterFlags { get; set; }
50+
public SeBlacklistModes InputFilter { get; set; }
5151

5252
/// <summary>
5353
/// Internal Bind-EventProxy map
@@ -111,8 +111,8 @@ protected override void HandleInput(Vector2 cursorPos)
111111
if (!InputPredicate?.Invoke() ?? false)
112112
return;
113113

114-
if (InputFilterFlags != SeBlacklistModes.None)
115-
BindManager.RequestTempBlacklist(InputFilterFlags);
114+
if (InputFilter != SeBlacklistModes.None)
115+
BindManager.RequestTempBlacklist(InputFilter);
116116

117117
var owner = (object)(FocusHandler?.InputOwner) ?? Parent;
118118

TextEditorExample/Data/Scripts/TextEditorExample/RichHudFramework/Shared/UI/HUD/HudElements/InputElements/IBindInput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public interface IBindInput : IFocusableElement, IEnumerable<IBindEventProxy>
6161
/// until the BintInputElement is disabled.
6262
/// <para>Uses <see cref="BindManager.RequestTempBlacklist(SeBlacklistModes)"/>.</para>
6363
/// </summary>
64-
SeBlacklistModes InputFilterFlags { get; set; }
64+
SeBlacklistModes InputFilter { get; set; }
6565
}
6666

6767
/// <summary>

0 commit comments

Comments
 (0)