Иконка ресурса

LUA [nixware] ImGui 1.90.9 ( shadows ) 1.6.0

Added svg support to CreateTextureFromFile
Added optional agrument 'size' to CreateTextureFromFile
Lua:
local texture = ImGui.CreateTextureFromFile( 'path' )
local second_texture = ImGui.CreateTextureFromFile( 'path', ImGui.ImVec2( 100, 100 ) )

Added GetTextureInfo
Lua:
local texture = ImGui.CreateTextureFromFile( 'path' )
local texture_info = ImGui.GetTextureInfo( texture )

print( tostring( texture_info.Width ) )
print( tostring( texture_info.Height ) )

Removed addons_module

Updated VT
Fixed Combo/ListBox

1721314495847.png


Lua:
local ImGui = require( 'cimgui' )

local item = ImGui.new.int( 0 )
local item_list = {'Item 1', 'Item 2', 'Item 3', 'Item 4', 'Item 5'}
local items = ImGui.new['const char*'][#item_list]( item_list )

ImGui.Paint( function( )
    ImGui.Begin( 'Window' )
    ImGui.Combo( 'Combo', item, items, #item_list )
    ImGui.ListBox( 'ListBox', item, items, #item_list )
    ImGui.End( )
end )
Added FreeType
Added imgui.GetBuilderForFreeType( )
Added imgui.FreeTypeBuilderFlags

1721292605642.png


Lua:
local ImGui = require( 'cimgui' )

local font_config = ImGui.ImFontConfig( )
font_config.OversampleH = 3
font_config.OversampleV = 3
font_config.PixelSnapH = false
font_config.FontBuilderFlags = bit.bor( ImGui.FreeTypeBuilderFlags.Monochrome, ImGui.FreeTypeBuilderFlags.MonoHinting )
local font = ImGui.GetIO( ).Fonts:AddFontFromFileTTF( 'C:/windows/fonts/verdana.ttf', 13, font_config, ImGui.GetIO( ).Fonts:GetGlyphRangesCyrillic( ) )

ImGui.Paint( function( )
    ImGui.Begin( 'Window' )

    ImGui.PushFont( font )
    ImGui.Text( 'Text FreeType' )
    ImGui.PopFont( )

    ImGui.End( )
end )

Updated VT
Added legacy support
1721149459493.png
Fixed TextInputs

Added TextLink
изображение_2024-07-15_220048591.png

Lua:
local ImGui = require( 'cimgui' )

ImGui.Paint( function( )
    ImGui.Begin( 'Window' )
    ImGui.TextLink( 'TextLink' )
    if ImGui.TextLink( 'Second TextLink' ) then
        print( '123123' )
    end
    ImGui.End( )
end )

Updated VT
Сверху Снизу