Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Oct 21, 2024
1 parent c858e67 commit e9bc27a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Misc/qs_pak/scripts/expmode_engine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,20 @@ local function textures_onupdate(self)
imTableNextColumn()
imText(entry.index)
imTableNextColumn()
imText(entry.name)
if imSelectable(entry.name) then
expmode.window(entry.name,
function (self)
local visible, opened = imBegin(self.title, true)

if visible and opened then
local texture = entry.texture
ImGui.Image(texture.texnum, imVec2(texture.width, texture.height))
end

imEnd()
return opened
end)
end
imTableNextColumn()
imText(entry.width)
imTableNextColumn()
Expand All @@ -188,6 +201,7 @@ local function textures_onshow(self)
for i, tex in ipairs(textures.list()) do
local entry =
{
texture = tex,
index = tostring(i),
name = tex.name,
width = tostring(tex.width),
Expand Down
3 changes: 3 additions & 0 deletions Quake/ls_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,9 @@ static int LS_global_textures_list(lua_State* state)
lua_pushstring(state, "height");
lua_pushinteger(state, texture->height);
lua_rawset(state, -3);
lua_pushstring(state, "texnum");
lua_pushinteger(state, texture->texnum);
lua_rawset(state, -3);

// Set texture table as sequence value
lua_rawseti(state, -2, i);
Expand Down

0 comments on commit e9bc27a

Please sign in to comment.