Giter Club home page Giter Club logo

lxgui's People

Contributors

cschreib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lxgui's Issues

Add SDL backend

SDL is a fairly standard and widely supported rendering/input backend. Adding an SDL backend to lxgui would increase the number of projects that could use the library.

Differences with SFML:

  • SDL is written in C, so I will likely have to write more boilerplate to get it all working, unless I use something like https://github.com/libSDL2pp/libSDL2pp? But then it has to be inter-operable with pure SDL, in case users use their C API or another C++ wrapper.
  • SDL has support for WebAssembly / emscripten, which is really good for demos and getting people engaged.

Make root uiobjects frames

Layered regions should not be allowed to be root, so let's enforce this with the type system. Remove the public function add_root_uiobject() and merge this functionality into create_frame() (the overload that takes > 1 parameter) to be renamed create_root_frame().

Improve font match between renderer implementations

Currently the font rendered by SFML or SDL looks different and of slightly different size than that rendered by the OpenGL backend. This leads to inconsistencies in the GUI appearance depending on which backend is used.

Fix crash in OpenGL example

Thread 1 "lxgui-test" received signal SIGSEGV, Segmentation fault.
0x000055555557bffe in gui::gl::font::get_character_kerning (this=0x555555dd98c0, uiChar1=108 U'l', 
    uiChar2=4294967235 U'\xffffffc3') at /home/cschreib/programming/lxgui/gui/impl/gui/gl/src/gui_gl_font.cpp:219
219	        return lCharacterList_[uiChar1].lKerningInfo[uiChar2].x;

Garbage rendered with ScrollFrame

Sometimes, ScrollFrame rendered by SFML display garbage data, as if the internal texture size was not set correctly. This can be seen immediately when the test executable is run, by looking at the left panel of the file explorer.

Replace dynamic_cast() with a safer method

If a class is being destroyed, dynamic_cast() can return a null pointer if the derived class destructor has already been called. This can cause issues when the result of dynamic_cast is used to determine the type of the object being processed (i.e., to remove it from a special list).

Migrate out of Travis CI for builds

In November 2020, Travis CI stopped providing free CI services to open source projects. lxgui burned through the free credit in an instant, and it is no longer possible to get builds from Travis CI unless I move to a paid plan. At $70 a month, that's not going to happen.

A replacement CI service must be found. GitHub actions are probably the best. Acceptance criteria:

  • Must: able to build lxgui on both linux and windows
  • Must: able to build and publish the documentation
  • Should: MacOS support
  • Should: able to publish build outputs (and ideally connect to github releases)
  • Could: able to run static analysis (clang-tidy)
  • Could: able to run tests

Add infrastructure for generating documentation of Lua API

Currently, the Lua API of lxgui is undocumented. It follows closely the original WoW API, but:

  • The WoW API has far more functions that lxgui does not (related to locking the interface to prevent cheating, or custom WoW-specific widgets, etc.)
  • The WoW API isn't always super well documented (there are several websites and the quality varies)
  • There are a number of differences between the functions in common between the two APIs

Acceptance criteria:

  • The Lua API should be integrated in the Doxygen output if possible. This can use lua2dox. Not possible.
  • The Lua API should have its own separate section so it doesn't end up mixing up with the C++ API
  • The Lua API documentation is in the glue source next to the function, if at all possible.
  • There are a few examples of documented functions, to specify how the documentation should be written (what level of detail, conventions, etc.).

Once this is done, getting the API fully documented can be a background task.

Do not support inheriting from gui::sprite

Currently gui::sprite could be derived in one of the renderer implementations. This has not proved necessary, so the feature should be removed for better performance.

Remove useless dynamic_casts

Places where this can be avoided:

  • add a get_parent() method to Lua glues that returns the right type already instead of uiobject*
  • make uiobject parent a frame (#33)
  • copy_from() : the inheritance code already checks using is_object_type(), so can use static_cast
  • ...

Move all code into a common namespace

Currently the library has 5 different namespaces with very generic names (input, utils, etc.). This will not play nice with other code bases using lxgui, so we should wrap all namespaces into a common namespace, such as lxgui.

Make the test project more accessible and standalone

Currently, the test project is buried deep in the folder hierarchy and relies on being part of the CMake build of the library. This is not practical for people who just want to explore the test to see what the library looks like. It is also not practical for people willing to integrate lxgui into their project, since it doesn't show how to use the FindLXGUI script etc.

Start replacing luapp by sol

sol is much easier to use for the end user. We should at least make this the main user-facing interface with Lua now, and slowly deprecate/replace luapp internally after v2.0.

Add manager wrapper to simplify initialization

Given that the GUI and Input can now be provided by SFML, it should be possible to add a wrapper around gui::manager to initialize it with a full SFML implementation, which would make it easier on the user.

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.