This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sample custom iterator. | |
// By perfectly.insane (http://www.dreamincode.net/forums/index.php?showuser=76558) | |
// From: http://www.dreamincode.net/forums/index.php?showtopic=58468 | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <iterator> | |
#include <cassert> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <imgui.h> | |
#include <imgui_internal.h> | |
// ImDrawList methods to display vertical text | |
/* | |
// TEST: inside a window: | |
ImGuiWindow* window = ImGui::GetCurrentWindow(); | |
ImDrawList* dl = window->DrawList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* edtaa3() | |
* | |
* Sweep-and-update Euclidean distance transform of an | |
* image. Positive pixels are treated as object pixels, | |
* zero or negative pixels are treated as background. | |
* An attempt is made to treat antialiased edges correctly. | |
* The input image must have pixels in the range [0,1], | |
* and the antialiased image should be a box-filter | |
* sampling of the ideal, crisp edge. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// On Ubuntu, I can compile it with the following command line (provided that imgui.h is two folders up, and that I want to use glfw): | |
// gcc -o basicExample mainBasic.cpp -I"../../" ../../imgui.cpp ../../imgui_draw.cpp -D"IMGUI_INCLUDE_IMGUI_USER_H" -D"IMGUI_INCLUDE_IMGUI_USER_INL" -I"/usr/include/GLFW" -D"IMGUI_USE_GLFW_BINDING" -L"/usr/lib/x86_64-linux-gnu" -lglfw -lX11 -lm -lGL -lstdc++ -s | |
// This file is intended to test/answer to https://github.com/Flix01/imgui/issues/15 | |
// RESULT: | |
// Dynamic enum works! | |
// And if you can use dynamic_cast<>() making new Node types that use it is easier (non-intrusive) | |
// Otherwise you must modify the code of CustomEnumEditorNode::render(...) for every new user class you add. | |
// | |
// Added also some code to serialize/deserialize the enum names ("TestEnumNames") together |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gist made after this issue: https://github.com/mackron/dr_libs/issues/142 | |
/* | |
The license refers to this single file. | |
Every included or linked library comes with its own license | |
=============================================================================== | |
Public Domain (www.unlicense.org) | |
=============================================================================== | |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this | |
software, either in source code form or as a compiled binary, for any purpose, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This code is an extension of the 'keyboard section' present in 'imgui_demo.cpp'. | |
License is the same (MIT License AFAIK) | |
*/ | |
#include <imgui_virtual_keyboard.h> | |
namespace ImGui { | |
// VirtualKeyboard Implementation | |
const char** GetKeyboardLogicalLayoutNames() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This software is provided 'as-is', without any express or implied | |
// warranty. In no event will the authors be held liable for any damages | |
// arising from the use of this software. | |
// Permission is granted to anyone to use this software for any purpose, | |
// including commercial applications, and to alter it and redistribute it | |
// freely, subject to the following restrictions: | |
// 1. The origin of this software must not be misrepresented; you must not | |
// claim that you wrote the original software. If you use this software | |
// in a product, an acknowledgment in the product documentation would be | |
// appreciated but is not required. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
# Requirements: | |
# Python 3.7+ (uses data classes, lines 16 and 25). | |
import dataclasses as dc | |
import os | |
import subprocess | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Used in https://github.com/SCP002/terminator. | |
package main | |
import ( | |
"errors" | |
"os" | |
"golang.org/x/sys/windows" | |
) |
NewerOlder