Giter VIP home page Giter VIP logo

Comments (5)

aiekick avatar aiekick commented on May 21, 2024

ok, im not very familiar with wide chars.
its for unicode support ?

can you propose a PR ?

from imguifiledialog.

aiekick avatar aiekick commented on May 21, 2024

if i change all std::string to std::wstring and char to WCHAR i break ImGui, who is not supproting wide char for the moment.
it will be difficult to support both modes. but i can use only GetLogicalDriveStringsA, CreateDirectoryA, and other func directly for avoid unicode crash

from imguifiledialog.

sonoro1234 avatar sonoro1234 commented on May 21, 2024

Wide char version of windows functions should be used, then wide chars are converted to utf-8 so that imgui could use them. When you go from imgui to wide chat filesystem functions you need the opposite conversion.
Basically you need two functions: from WideChar2UTF and UTF2WideChar,
This are the ones I made for LuaJIT: https://github.com/sonoro1234/luafilesystem/blob/unicode/lfs_ffi.lua#L190

from imguifiledialog.

aiekick avatar aiekick commented on May 21, 2024

if i do in code
#define std::string std::wtring
#define char wchar_t
with corret include file as well
when we want wchar ? its ok ?

because i found many issue with wchar in the imgui doc about perf. not sure about the problem and the solution you propose, since i have no more information

the best way is, you propose a PR i think

from imguifiledialog.

aiekick avatar aiekick commented on May 21, 2024

hello there,

i have finally created an implementation with std::filesystem (c++17) of the new ImGuiFileDialog

you just need to use this define in the config file

#define USE_STD_FILESYSTEM

you can test that in the branch : https://github.com/aiekick/ImGuiFileDialog/tree/Lib_Only_Std__FileSystem_WIP

as i know the unicode is fully supported now, ( just fixed a bug in the path composer)

from imguifiledialog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.