Skip to content

Instantly share code, notes, and snippets.

Example Code

<form action="http://www.metroeguide.net/meg_search/Search" method="get" target="_blank">
  <p align="center">  
    <input type="text" name="q" />
    <input type="hidden" name="clientId" value="459" />
    <input type="hidden" name="f" value="51,414,500"/>
    <input type="submit" value="Search" />
  </p>
// _guiTexture is a texture of a bunch of gui images (buttons, scrollbars panels ect)
// srcRectangle in this case is the source rectange of a 64x64 button
// create render target
// if I set this to the same size of the backbuffer it draws how i expect it, but for some reason
// changing the width/height of this is changing the look when drawn to the screen...
// this doesn't make sense to me because i'm only using 64x64 pixels of this big area...changing it's size
// shouldn't have any effect in my mind
Canvas = new RenderTarget2D(Graphics, 800, 600)
public class Game1 : Game
{
private GraphicsDeviceManager _graphics;
SpriteBatch _spriteBatch;
private bool _testRenderTarget = false;
private Texture2D _guiTexture;
private RenderTarget2D _renderTarget;
public Game1()
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);
if (_testRenderTarget)
{
_spriteBatch.Begin(SpriteSortMode.Immediate);
GraphicsDevice.SetRenderTarget(_renderTarget);
_spriteBatch.Draw(_guiTexture, new Rectangle(0, 0, 64, 64), new Rectangle(0, 0, 64, 64), Color.White);
_spriteBatch.End();
@KyleGobel
KyleGobel / settings.json
Last active September 27, 2020 14:48
Windows Terminal
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"alwaysShowTabs": true,
"copyOnSelect": false,
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"disabledProfileSources": [
"Windows.Terminal.Azure"
],
"initialCols": 120,
"initialRows": 30,
using System.Text;
var RegFieldEncoding = new Dictionary<(int reg, int w), string>()
{
{ (0b000, 0), "al" },
{ (0b000, 1), "ax" },
{ (0b001, 0), "cl" },
{ (0b001, 1), "cx" },