Skip to content

Instantly share code, notes, and snippets.

@EEmmanuel7
EEmmanuel7 / imgui_node_graph_test.cpp
Created January 30, 2016 12:36 — forked from ocornut/imgui_node_graph_test.cpp
Node graph editor basic demo for ImGui
// Creating a node graph editor for ImGui
// Quick demo, not production code! This is more of a demo of how to use ImGui to create custom stuff.
// Better version by @daniel_collin here https://gist.github.com/emoon/b8ff4b4ce4f1b43e79f2
// See https://github.com/ocornut/imgui/issues/306
// v0.02
// Animated gif: https://cloud.githubusercontent.com/assets/8225057/9472357/c0263c04-4b4c-11e5-9fdf-2cd4f33f6582.gif
// NB: You can use math functions/operators on ImVec2 if you #define IMGUI_DEFINE_MATH_OPERATORS and #include "imgui_internal.h"
// Here we only declare simple +/- operators so others don't leak into the demo code.
static inline ImVec2 operator+(const ImVec2& lhs, const ImVec2& rhs) { return ImVec2(lhs.x+rhs.x, lhs.y+rhs.y); }
@EEmmanuel7
EEmmanuel7 / imgui_memory_editor.h
Created January 30, 2016 12:56 — forked from ocornut/(Archived) imgui_memory_editor.h
Mini memory editor for ImGui (to embed in your game/tools)
// Mini memory editor for ImGui (to embed in your game/tools)
// v0.10
// Animated gif: https://cloud.githubusercontent.com/assets/8225057/9028162/3047ef88-392c-11e5-8270-a54f8354b208.gif
//
// You can adjust the keyboard repeat delay/rate in ImGuiIO.
// The code assume a mono-space font for simplicity! If you don't use the default font, use ImGui::PushFont()/PopFont() to switch to a mono-space font before caling this.
//
// Usage:
// static MemoryEditor memory_editor; // save your state somewhere
// memory_editor.Draw("Memory Editor", mem_block, mem_block_size, (size_t)mem_block); // run
// pie menu test
// v0.00
#include <imgui_internal.h>
// Return >= 0 on mouse release
// Optional int* p_selected display and update a currently selected item
int PiePopupSelectMenu(const ImVec2& center, const char* popup_id, const char** items, int items_count, int* p_selected)
{
int ret = -1;
@EEmmanuel7
EEmmanuel7 / index.html
Created August 16, 2018 03:41
Twitter search form
<!-- search form -->
<div id="wrap">
<form id="nav-search" class="form-search" action="/search" role="search">
<input id="search-query" class="search-input" type="text" placeholder="Search" />
<button class="icon" type="submit"></button>
</form>
</div>
@EEmmanuel7
EEmmanuel7 / index.html
Created November 2, 2018 03:21
Responsive Mega Menu
<link href='https://fonts.googleapis.com/css?family=Roboto:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
</head>
<body class="background">
@EEmmanuel7
EEmmanuel7 / credit-card-form.markdown
Created December 12, 2018 05:27
Credit Card Form
@EEmmanuel7
EEmmanuel7 / filepond-multiple-file-upload.markdown
Created January 8, 2019 01:54
FilePond Multiple File Upload
@EEmmanuel7
EEmmanuel7 / index.html
Created March 29, 2020 23:45
Three.js+ImGui JavaScript
<canvas id="output"></canvas>
@EEmmanuel7
EEmmanuel7 / index.html
Created September 14, 2020 19:36
Recursive Hover Nav ( Only CSS )
<nav>
<menu>
<menuitem id="demo1">
<a>drop</a>
<menu>
<menuitem><a>about</a></menuitem>
<menuitem>
<a>settings</a>
<menu>
<menuitem><a>Test 1</a></menuitem>
@EEmmanuel7
EEmmanuel7 / PieMenu.cpp
Created December 4, 2020 19:35 — forked from thennequin/PieMenu.cpp
PieMenuAdv
struct PieMenuContext
{
static const int c_iMaxPieMenuStack = 8;
static const int c_iMaxPieItemCount = 12;
static const int c_iRadiusEmpty = 30;
static const int c_iRadiusMin = 30;
static const int c_iMinItemCount = 3;
static const int c_iMinItemCountPerLevel = 3;
struct PieMenu