Coder Social home page Coder Social logo

Why no mouse right click? about geonbit.ui HOT 3 CLOSED

ronenness avatar ronenness commented on May 26, 2024
Why no mouse right click?

from geonbit.ui.

Comments (3)

RonenNess avatar RonenNess commented on May 26, 2024 1

To avoid code duplication you can call base.Update(...) from your custom Update() function, and just append your extra logic after.

I'm closing this ticket as I feel your questions were answered, but if not feel free to reopen :)
Cheers.

from geonbit.ui.

RonenNess avatar RonenNess commented on May 26, 2024

Thanks, glad you like it! :)

I have yet to see a reason for a right click in the entities I have, usually right click is used to open a special menu or do an alternative action, and there's nothing like that on GeonBit.UI. Maybe one day I'll add right-click options to text inputs (cut / copy / paste) but that's a whole feature on its own.
Can you provide an example of an entity you feel missing a right click, and what would you have the right click action do?

PS. InputHelper does support right click, its mouse-related functions accept a button code param (which defaults to left mouse button). for example: https://github.com/RonenNess/GeonBit.UI/blob/master/GeonBit.UI/Source/InputHelper.cs#L485

from geonbit.ui.

Temeez avatar Temeez commented on May 26, 2024

A special menu is the thing I'm trying to create for a custom entity that is derived from the Icon entity. For example if you have a potion in your inventory and left click uses it, right click would open a small special menu which has addional actions for it, like drop, etc. Buttons could benefit from a right click special menu too.

Oh you're right, for some reason I didn't realise that was the default.

I know I could override the Update() in my custom entity to make right click a thing but I think that would lead to a lot of code duplication, probably..

from geonbit.ui.

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.