mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
refactor: resolve component style violations
This commit is contained in:
parent
3f41c20a12
commit
76fc6e2a8d
3 changed files with 18 additions and 8 deletions
|
|
@ -5,7 +5,9 @@ using ImGuiNET;
|
|||
|
||||
namespace Dalamud.Interface.Components
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Component Demo Window to view custom components.
|
||||
/// </summary>
|
||||
internal class ComponentDemoWindow : Window
|
||||
{
|
||||
private readonly IComponent[] components =
|
||||
|
|
@ -13,6 +15,9 @@ namespace Dalamud.Interface.Components
|
|||
new TestComponent(),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ComponentDemoWindow"/> class.
|
||||
/// </summary>
|
||||
public ComponentDemoWindow()
|
||||
: base("Dalamud Components Demo")
|
||||
{
|
||||
|
|
@ -20,6 +25,7 @@ namespace Dalamud.Interface.Components
|
|||
this.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Draw()
|
||||
{
|
||||
ImGui.BeginChild("comp_scrolling", new Vector2(0, 0), false, ImGuiWindowFlags.AlwaysVerticalScrollbar | ImGuiWindowFlags.HorizontalScrollbar);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace Dalamud.Interface.Components
|
|||
public interface IComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the component.
|
||||
/// Gets the name of the component.
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ImGuiNET;
|
||||
|
||||
namespace Dalamud.Interface.Components
|
||||
{
|
||||
class TestComponent : IComponent
|
||||
/// <summary>
|
||||
/// Test component to demonstrate how ImGui components work.
|
||||
/// </summary>
|
||||
public class TestComponent : IComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets component name.
|
||||
/// </summary>
|
||||
public string Name { get; } = "Test Component";
|
||||
|
||||
/// <summary>
|
||||
/// Draw test component.
|
||||
/// </summary>
|
||||
public void Draw()
|
||||
{
|
||||
ImGui.Text("You are viewing the test component. The test was a success.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue