GithubHelp home page GithubHelp logo

Comments (4)

victorlevasseur avatar victorlevasseur commented on May 3, 2024

In fact, the class can't contain the polygon treeview editor as it contains some specific Sprite features such as copying the mask to the whole animation and so on...

from gdevelop.

4ian avatar 4ian commented on May 3, 2024

A PolygonEditorHelper class would be still nice I think :) It should provide as you said so feature so that it can be connected to a wxPanel (the poloygon editor helper should be agnostic regarding what is displayed inside the panel: it should just draw the polygon and the anchors, and handle events using its OnLeftDownEvent method).

For the treeview, it may be excluded from this refactoring for now.. Maybe it could be included just after, and provide a separate method to customize the toolbar (so that the sprite editor can add its own buttons in the toolbar :) )

from gdevelop.

victorlevasseur avatar victorlevasseur commented on May 3, 2024

Currently working on it on my fork's polygon-edition-helper branch.
I've made the choice to pass almost all the required stuff (vector of polygons, offset, maximum polygon point position) in each functions (OnPaint, OnMouseLeftDown, OnMouseMove, ...) to make it work easily with the sprite editor (as the mask is got again and again in each editor's functions).
So the PolygonEditionHelper is restricted only to the drawing and to the point drag&drop without owning the polygons and even a pointer to the polygons.
I plan to do almost a similar thing for the Tree view but it'll come afterwards.

from gdevelop.

4ian avatar 4ian commented on May 3, 2024

Excellent choice, I think it's the best choice to make for a helper class
(having methods that can be simply used by a call with all the necessary
argument). It will be easy to plug this helper class into the already
existing sprite editor !

Keep up the good work, let me know if you need help on a particular point :)

from gdevelop.

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.