Just having issues getting a few png thumbnails to load via NUI, everything else is working as expected with reguards to js, cs, html, and lua. Hoping this is an easy solution, having been searching and trying for days.
There is nothing in CSS or JS to hide images in DOM, the images just break, standard html broken image icon.
i have tried many url variants such as.
nui://nui/image.png etc, no solutions as of yet.
__resource.lua "the images are just test images, i have tried all shapes and sizes and variations of png.
ui_page "nui/ui.html"
-- Add the files that need to be used/loaded
files {
"nui/ui.html",
"nui/ui.js",
"nui/ui.css",
"nui/120px-Police.png",
"nui/Chip.png"
}
-- Initiate the clientside lua script
client_script 'cl_action.lua'
ui.html
<!doctype html>
<html>
<head>
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
<script src="ui.js" type="text/javascript"></script>
<link href="ui.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="actionmenu" style="display: none;">
<!-- Main Menu -->
<div id="mainmenu">
<div class="pages" style="">
<big><b>Main Menu</b></big><br />
<img src="nui/120px-Police.png" id="veh" />
<img src="nui/Chip.png" id="veh2" />
</div>
</div>
<!-- Do not remove this or you will not be able to exit the menu -->
<button class="menuoption" data-action="exit"><big><b>Close<b></big></button>
<div style="float:left;clear:right;position: absolute;bottom:2px;"><b><big>Z-ablet</big> <small><i>by @ShawnDaGeek</i></small></b>
</div>
</div>
</body>
</html>