Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Other MMORPG Hacks › Terraria Hacks › ImGui item giver

ImGui item giver

Posts 1–7 of 7 · Page 1 of 1
IT
ItsMakar
ImGui item giver
hello, I'm making my client for a terrarium with ImGui and I want to make an item giver, but I don't understand 2 things in 1 how to get the texture of an object by ID and in 2 how to create buttons, I tried to create them through foreach, but nothing worked for me
#1 · 4y ago
convicted tomatophile
convicted tomatophile
TextureAssets.Item[id] returns an Asset<Texture2D> of that item. If you're unsure of whether the item's asset will be loaded (1.4 uses asynchronous asset loading), request the asset manually with ImmediateLoad instead of AsyncLoad.
#2 · 4y ago
IT
ItsMakar
Quote Originally Posted by convicted tomatophile View Post
TextureAssets.Item[id] returns an Asset<Texture2D> of that item. If you're unsure of whether the item's asset will be loaded (1.4 uses asynchronous asset loading), request the asset manually with ImmediateLoad instead of AsyncLoad.
how can i display the texture? when using imguics it displays a white square instead of a texture i use https://******.com/0x0ade/ImGuiCS/bl...GuiXNAState.cs

- - - Updated - - -

Quote Originally Posted by convicted tomatophile View Post
TextureAssets.Item[id] returns an Asset<Texture2D> of that item. If you're unsure of whether the item's asset will be loaded (1.4 uses asynchronous asset loading), request the asset manually with ImmediateLoad instead of AsyncLoad.
~~And the problem is not even in imgui, the problem is that this method returns Assets, that is, it is not automatically compatible with imgui / xna. The question is how does terraria render such textures?~~

oh i just had to add .value

- - - Updated - - -

i finally fixed my problem

but when i try to display exactly the texture from the terraria i get a white square

as far as I understand, the problem is in imgui or my parameters of the button with a picture, since I made a completely working method for obtaining texture by ID here are the codes


public static Texture2D GetTextureByID(string type, int id, GraphicsDevice graphicsdevice)
{
var tx = new Texture2D(graphicsdevice, 20, 20);
if (type == "item") { tx = Main.instance.Content.Load<Texture2D>("Images\\Ite m_" + id); }
if (type == "npc") { tx = Main.instance.Content.Load<Texture2D>("Images\\NPC _" + id); }
if (type == "projectile") { tx = Main.instance.Content.Load<Texture2D>("Images\\Pro jectile_" + id); }
if (type == "buff") { tx = Main.instance.Content.Load<Texture2D>("Images\\Buf f_" + id); }
return tx;
}

ImGui.ImageButton(ImGuiState.Register(texture), new ImVec2(50, 50), new ImVec2(0, 0), new ImVec2(0, 0), 0, new ImVec4(1, 1, 1, 1), new ImVec4(1, 1, 1, 1));

I FIXED IT!!!!!!!!!
#3 · edited 4y ago · 4y ago
IT
ItsMakar
.
it works but i can't filter items because text input doesn't work any idea how to fix it? I use the ImGuiXNA renderer and apparently the problem is in it
#4 · 4y ago
HiImKyle
HiImKyle
ImGuiXNA is outdated and pretty bad, consider using ImGui.NET
#5 · 4y ago
IT
ItsMakar
imgui.net too not work with xna :(
Quote Originally Posted by HiImKyle View Post
ImGuiXNA is outdated and pretty bad, consider using ImGui.NET
imgui.net too not work with xna

EDIT: ok someday i will try to completely rewrite my client to imgui.net and i hope it helps
#6 · edited 4y ago · 4y ago
IT
ItsMakar
Quote Originally Posted by convicted tomatophile View Post
TextureAssets.Item[id] returns an Asset<Texture2D> of that item. If you're unsure of whether the item's asset will be loaded (1.4 uses asynchronous asset loading), request the asset manually with ImmediateLoad instead of AsyncLoad.
you know how to get item name by id?

- - - Updated - - -

and how to auto new line after 10 image buttons?
#7 · 4y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • Free Item GiverBy Jaketh3snake in Realm of the Mad God Help & Requests
    13Last post 13y ago
  • Writing a Item GiverBy Neppuu in Reign Of Kings Discussions & Help
    1Last post 11y ago
  • Runescape Item GiverBy MrHackster in RuneScape Discussions
    3Last post 13y ago
  • B> some ares items for usdBy AN1MAL in General Game Hacking
    3Last post 20y ago
  • Cheat Engine.. ITEM SHOP!By Shpalman in WarRock - International Hacks
    10Last post 19y ago

Tags for this Thread

None