ObsidianDragon - DragonX ImGui Wallet
Full-node GUI wallet for DragonX cryptocurrency. Built with Dear ImGui, SDL3, and OpenGL3/DX11. Features: - Send/receive shielded and transparent transactions - Autoshield with merged transaction display - Built-in CPU mining (xmrig) - Peer management and network monitoring - Wallet encryption with PIN lock - QR code generation for receive addresses - Transaction history with pagination - Console for direct RPC commands - Cross-platform (Linux, Windows)
This commit is contained in:
35
src/util/noise_texture.h
Normal file
35
src/util/noise_texture.h
Normal file
@@ -0,0 +1,35 @@
|
||||
// DragonX Wallet - ImGui Edition
|
||||
// Copyright 2024-2026 The Hush Developers
|
||||
// Released under the GPLv3
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "imgui.h"
|
||||
|
||||
namespace dragonx {
|
||||
namespace util {
|
||||
|
||||
// Returns a cached noise texture (created on first call).
|
||||
// The texture is a 256x256 tileable white-noise pattern with
|
||||
// per-pixel random alpha (0-255) designed to be overlaid at very
|
||||
// low opacity to give cards a subtle grain / paper texture.
|
||||
//
|
||||
// texSize receives 256 (the width/height of the texture).
|
||||
ImTextureID GetNoiseTexture(int* texSize = nullptr);
|
||||
|
||||
// Returns a viewport-sized pre-tiled noise texture (single draw call).
|
||||
// The 256x256 base noise is tiled across the given viewport dimensions.
|
||||
// Re-creates the texture when the viewport size changes.
|
||||
// outW/outH receive the actual texture dimensions.
|
||||
ImTextureID GetTiledNoiseTexture(int viewportW, int viewportH,
|
||||
int* outW = nullptr, int* outH = nullptr);
|
||||
|
||||
// Draw a tiled noise overlay in a single AddImage call.
|
||||
// Uses the pre-tiled viewport-sized texture — call this instead of
|
||||
// manually looping with AddImage for each tile.
|
||||
// dl: draw list, pMin/pMax: rect to cover, tintColor: alpha-premultiplied tint.
|
||||
void DrawTiledNoiseRect(ImDrawList* dl, const ImVec2& pMin, const ImVec2& pMax,
|
||||
ImU32 tintColor);
|
||||
|
||||
} // namespace util
|
||||
} // namespace dragonx
|
||||
Reference in New Issue
Block a user