Code Monkey home page Code Monkey logo

magnum-extras's People

Contributors

bqqbarbhg avatar jlaxson avatar mosra avatar mtao avatar squareys avatar sthalik avatar thehans 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

magnum-extras's Issues

AbstractPlane::activate() causes assertion failure

It looks like AbstractPlane::activate assumes that a plane cannot be both hidden and at the front of the hierarchy, and there is an assertion enforcing this:

void AbstractPlane::activate() {
/* Already active, no-op */
if(list()->last() == this) {
CORRADE_INTERNAL_ASSERT(!(_flags & PlaneFlag::Hidden));
return;
}
/* Move to front of the hierarchy and show */
list()->move(this, nullptr);
_flags &= ~PlaneFlag::Hidden;
}

In my usage, this assertion has had a lot of failures. For example, if you:

  1. Create a UserInterface
  2. Add a Plane to it
  3. Call Plane::hide()
  4. Call Plane::activate()

This causes a crash, even though it seems like perfectly legitimate usage.

I was able to fix it for my purposes by just deleting the if-statement and the two lines inside it. But I suspect that there's a reason that assertion is there, which is why I'm hesitant to submit a PR.

I know this project is on hold, but I thought I would file an issue in case someone picks it up again (or someone with the same problem as me checks the issues for help).

Ui: Add method to get hovered widget(s)

Hi @mosra !

As per gitter, I have a use case (some drop event) where I would like to be able to query the hovered widget(s) (e.g. the toplevel widget of some stack as you suggested).

Cheers, Jonathan

How to install arch linux PKGBUILDs

I tried following the instructions from Magnum's building docs and wanted to install the Emscripten wasm toolchain, however these pkgbuild's are not available in the AUR and installing them via makepkg gives me unresolved dependency errors.

Ξ package/archlinux → makepkg --nocheck -fp PKGBUILD-emscripten-webgl2
==> Making package: emscripten-magnum-extras dev.webgl2-1 (Tue 06 Dec 2022 07:15:34 PM IST)
==> Checking runtime dependencies...
==> Missing dependencies:
  -> emscripten-magnum=dev.webgl2
  -> emscripten-magnum-plugins=dev.webgl2
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.

How do I go about installing those? What is the procedure?

Error: Building package magnum-extras:x86-windows failed with: BUILD_FAILED

Actually build failed when I installed magnum-extras[ui]:x86-windows

here is the log

PS D:\WorkSpace\vcpkg> .\vcpkg.exe install magnum-extras[ui]
The following packages will be built and installed:
    magnum-extras[core,ui]:x86-windows
Starting package 1/1: magnum-extras:x86-windows
Building package magnum-extras[core,ui]:x86-windows...
-- Using cached D:/WorkSpace/vcpkg/downloads/mosra-magnum-extras-v2018.04.tar.gz
-- Using source at D:/WorkSpace/vcpkg/buildtrees/magnum-extras/src/v2018.04-c2a8d6e41e
-- Configuring x86-windows
-- Building x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_build_cmake.cmake:175 (message):
    Command failed: C:/Program Files/CMake/bin/cmake.exe;--build;.;--config;Debug;--target;install;--;-v;-j1
    Working Directory: D:/WorkSpace/vcpkg/buildtrees/magnum-extras/x86-windows-dbg
    See logs for more information:
      D:\WorkSpace\vcpkg\buildtrees\magnum-extras\install-x86-windows-dbg-out.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
  ports/magnum-extras/portfile.cmake:38 (vcpkg_install_cmake)
  scripts/ports.cmake:71 (include)


Error: Building package magnum-extras:x86-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: magnum-extras:x86-windows
  Vcpkg version: 0.0.113-nohash

Additionally, attach any relevant sections from the log files above.

and log in D:\WorkSpace\vcpkg\buildtrees\magnum-extras\install-x86-windows-dbg-out.log

D:\WorkSpace\vcpkg\buildtrees\magnum-extras\src\v2018.04-c2a8d6e41e\src\Magnum/Ui/Style.h(482): note: see declaration of 'Magnum::Ui::Implementation::TextShader'
D:\WorkSpace\vcpkg\installed\x86-windows\include\Corrade/Interconnect/Emitter.h(533): error C2338: Size of member function pointer is incorrectly assumed to be smaller than 2*sizeof(void*)
D:\WorkSpace\vcpkg\buildtrees\magnum-extras\src\v2018.04-c2a8d6e41e\src\Magnum\Ui\ValidatedInput.cpp(45): note: see reference to function template instantiation 'Corrade::Interconnect::Connection Corrade::Interconnect::connect<Magnum::Ui::ValidatedInput,Magnum::Ui::Input,Magnum::Ui::ValidatedInput,Magnum::Ui::ValidatedInput,const std::string&>(EmitterObject &,Corrade::Interconnect::Emitter::Signal (__thiscall Magnum::Ui::Input::* )(const std::string &),ReceiverObject &,void (__thiscall Magnum::Ui::ValidatedInput::* )(const std::string &))' being compiled
        with
        [
            EmitterObject=Magnum::Ui::ValidatedInput,
            ReceiverObject=Magnum::Ui::ValidatedInput
        ]
D:\WorkSpace\vcpkg\installed\x86-windows\include\Corrade/Interconnect/Emitter.h(449): warning C4121: 'Corrade::Interconnect::Implementation::MemberConnectionData<ReceiverObject,const std::string &>': alignment of a member was sensitive to packing
        with
        [
            ReceiverObject=Magnum::Ui::ValidatedInput
        ]
D:\WorkSpace\vcpkg\installed\x86-windows\include\Corrade/Interconnect/Emitter.h(545): note: see reference to class template instantiation 'Corrade::Interconnect::Implementation::MemberConnectionData<ReceiverObject,const std::string &>' being compiled
        with
        [
            ReceiverObject=Magnum::Ui::ValidatedInput
        ]

UI questions

https://doc.magnum.graphics/magnum/ui.html

Since the doc explicitly mentions it's not documented yet, I would like to ask some questions regarding the UI - I have an open-source project in mind and would like to use Magnum to make both a desktop and a web-based application (and to let you know - you have superior licensing compared to Qt).

  • Do I need to use the Dear Imgui library?
    • If yes, how customizable it is? Can I change only colors or more (like geometry, size, alignment etc)
    • If not - is there any way to have custom widgets? Doc mentions there is a singal+slot system - as long as there is a sort of 2D canvas (similar to HTML 5 canvas API) I'm fine with it to draw my own widgets and implement my event handlers.

Error when compiling for Android. ' implicit instantiation of undefined template Attribute<int>'

Having no luck compiling Ui for Android.
Tested with Android-Studio, gradle command-line and CMake cross-compilation. Same error.
Hoping it's a simple thing like missing Header or something stupid on my part that I've missed.

Full CMake output here: https://pastebin.com/RfbuWUuf

`In file included from /opt/android-ndk/sysroot/usr/include/Magnum/GL/Mesh.h:38:
/opt/android-ndk/sysroot/usr/include/Magnum/GL/Attribute.h:84:43: error: implicit instantiation of undefined template 'Magnum::GL::Implementation::Attribute'
VectorCount = Implementation::Attribute::VectorCount

/home/jq/projects/magnum-extras-clean/src/Magnum/Ui/Plane.cpp:53:100 : note: in instantiation of template class 'Magnum::GL::Attribute<3, int>' requested here
Implementation::AbstractQuadShader::ColorIndex{Implementation::AbstractQuadShader::ColorIndex::DataType::Short},

/opt/android-ndk/sysroot/usr/include/Magnum/GL/Attribute.h:41:25: note: template is declared here
template struct Attribute;
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . .
. . . etc
12 errors generated.
make[2]: *** [src/Magnum/Ui/CMakeFiles/MagnumUi.dir/build.make:179: src/Magnum/Ui/CMakeFiles/MagnumUi.dir/Plane.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:141: src/Magnum/Ui/CMakeFiles/MagnumUi.dir/all] Error 2
make: *** [Makefile:130: all] Error 2`

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.