Skip to content

Instantly share code, notes, and snippets.

@BlizzCrafter
BlizzCrafter / ImGuiRenderer.cs
Last active March 12, 2021 17:22
Fixed the "Click-Through"-bug in ImGuiRenderer in the XNA/MonoGame sample by checking Activated and Deactivated events in the game class and correspondingly setting the new bool "_inputPossible". https://github.com/mellinoe/ImGui.NET/blob/master/src/ImGui.NET.SampleProgram.XNA/ImGuiRenderer.cs
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace ImGuiNET.SampleProgram.XNA
{
/// <summary>
@BlizzCrafter
BlizzCrafter / ScreenWrapper.cs
Created June 10, 2019 12:13
Wraps Texture2Ds around the screen by using a set of RenderTarget2Ds.
public class Game1 : Game
{
private readonly GraphicsDeviceManager graphics;
private SpriteBatch spriteBatch;
private const int _ScreenWidth = 800;
private const int _ScreenHeight = 600;
private RenderTarget2D _WrapTarget;
private Texture2D _Circle, _Square;
@BlizzCrafter
BlizzCrafter / NodeString.cs
Created April 17, 2019 20:29
Create a custom Node for Node Editor Winforms: https://github.com/komorra/NodeEditorWinforms
[Serializable]
[TypeConverter(typeof(ExpandableObjectConverter))]
public class NodeString : ISerializable
{
[DisplayName("Input")]
public string SetValue { get; set; }
public override string ToString()
{
return "String";
@BlizzCrafter
BlizzCrafter / CoreControl.cs
Created August 31, 2018 17:46
Using LibretroApi with MonoGame.Forms
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonoGame.Forms.Controls;
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace LibMGTest