mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-21 16:09:19 +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
|
namespace Dalamud.Interface.Components
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Component Demo Window to view custom components.
|
||||||
|
/// </summary>
|
||||||
internal class ComponentDemoWindow : Window
|
internal class ComponentDemoWindow : Window
|
||||||
{
|
{
|
||||||
private readonly IComponent[] components =
|
private readonly IComponent[] components =
|
||||||
|
|
@ -13,6 +15,9 @@ namespace Dalamud.Interface.Components
|
||||||
new TestComponent(),
|
new TestComponent(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ComponentDemoWindow"/> class.
|
||||||
|
/// </summary>
|
||||||
public ComponentDemoWindow()
|
public ComponentDemoWindow()
|
||||||
: base("Dalamud Components Demo")
|
: base("Dalamud Components Demo")
|
||||||
{
|
{
|
||||||
|
|
@ -20,6 +25,7 @@ namespace Dalamud.Interface.Components
|
||||||
this.SizeCondition = ImGuiCond.FirstUseEver;
|
this.SizeCondition = ImGuiCond.FirstUseEver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
public override void Draw()
|
public override void Draw()
|
||||||
{
|
{
|
||||||
ImGui.BeginChild("comp_scrolling", new Vector2(0, 0), false, ImGuiWindowFlags.AlwaysVerticalScrollbar | ImGuiWindowFlags.HorizontalScrollbar);
|
ImGui.BeginChild("comp_scrolling", new Vector2(0, 0), false, ImGuiWindowFlags.AlwaysVerticalScrollbar | ImGuiWindowFlags.HorizontalScrollbar);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ namespace Dalamud.Interface.Components
|
||||||
public interface IComponent
|
public interface IComponent
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the component.
|
/// Gets the name of the component.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get; }
|
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;
|
using ImGuiNET;
|
||||||
|
|
||||||
namespace Dalamud.Interface.Components
|
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";
|
public string Name { get; } = "Test Component";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Draw test component.
|
||||||
|
/// </summary>
|
||||||
public void Draw()
|
public void Draw()
|
||||||
{
|
{
|
||||||
ImGui.Text("You are viewing the test component. The test was a success.");
|
ImGui.Text("You are viewing the test component. The test was a success.");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue