Download CommonLua/UI/Dev/uiTextureViewer.lua from sirnii/myspace: direct link, hf CLI and curl.
- Browser
- Download file 643 Bytes
-
https://huggingface.co/spaces/sirnii/myspace/resolve/main/CommonLua/UI/Dev/uiTextureViewer.lua
- Command line
-
hf download hf://spaces/sirnii/myspace/CommonLua/UI/Dev/uiTextureViewer.lua
-
curl -L -o uiTextureViewer.lua https://huggingface.co/spaces/sirnii/myspace/resolve/main/CommonLua/UI/Dev/uiTextureViewer.lua
643 Bytes
| function OpenTextureViewer(root, obj, prop, ged, alpha_only, in_game) | |
| if terminal.IsKeyPressed(const.vkAlt) then | |
| OS_LocateFile(obj[prop] or "") | |
| return nil | |
| elseif terminal.IsKeyPressed(const.vkControl) then | |
| OS_OpenFile(obj[prop] or "") | |
| return nil | |
| end | |
| local game_path = obj[prop] or "" | |
| OpenGedApp("GedImageViewer", false, { file_name = game_path or "", show_alpha_only = alpha_only }, nil, in_game) | |
| end | |
| function OpenTextureViewerAlpha(editor, obj, prop, ged) | |
| OpenTextureViewer(editor, obj, prop, ged, true) | |
| end | |
| function OpenTextureViewerIngame(editor, obj, prop, ged) | |
| OpenTextureViewer(editor, obj, prop, ged, false, true) | |
| end |