Git Product home page Git Product logo

druid's People

Contributors

aglitchman avatar agulev avatar astrochili avatar boruok avatar dmi7ry avatar insality avatar marconett avatar salavatr 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  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  avatar  avatar  avatar  avatar  avatar  avatar

druid's Issues

Mouse Hover

I am getting an immediate mouse_hover callback for all buttons upon starting, even if the mouse is not inside any button yet.

Expected: the callback is only triggered when the mouse goes inside the button's zone.
Tested on: Defold 1.2.169 Windows 10 desktop

Suggestion: is it possible to have separate callbacks instead, like:
on_mouse_enter
on_mouse_leave

? Use case is for example, I would like to change the color/image when the mouse enters the button's area, then revert back to old/original state when it leaves. Or is this already possible?

Thanks.

Button click question

Steps to reproduce:

  1. Press a button (but don't release it)
  2. Move the mouse outside the button
  3. Move back the mouse inside the button
  4. Release while inside the button

I was expecting that this will still generate a valid click event because the initial press and final release are on the same button.

However, it does not register a click event. Is this expected?

EDIT: I have modified the question and issue description, as the click outside events I previously mentioned were normal (for other buttons in the same gui).

Grid update

Add grid set position function
Add grid dynamic and static mode
Add reserve for element counts (for harder bounds)

Separate grid for static_grid and dynamic_grid component
static - single element sizes
dynamic - different element sizes, but with several restrictions

New components

local M = component.create("my_component")
The code above creates a brand new my_component. What if I just want to extend the existing functionality of an existing druid component e.g. a button. How can I do this?

Currently, I am using something like this:

function M.init(self, ...)
	self.druid = self:get_druid()
	self.button =  self.druid:new_button(...)
end

but then I have to override all functions like:

function M.set_enabled(self,state)
	self.button:set_enabled(state)
end

Is this the proper way to do things? Or is there a simpler way?

Thanks.

Update hover component

Now hover working only on mobile (hover, while holding touch key)
Need add another event on hover without any action (on desktop for example)

druid:on_input returns nil with scroll

-- drag.lua
function M.on_input(self, action_id, action)
    if action_id ~= const.ACTION_TOUCH and action_id ~= const.ACTION_MULTITOUCH then
        return
    end

should be return false?

Create Grid component

For sorting nodes in row, cols or both
Basic implementation
Useful to positioning a lot of nodes (ex. in list)

Later need to do more functionality:
Placing by nodes width, allow inserting in any place, allow use animation to re-place nodes

Hover events

When a button is disabled via set_enabled (false), I think the hover/mouse_hover events should be disabled as well? Right now, the button still get interactions even if it's disabled.

I can probably change this via styles, but it's better if this is "fixed" in the extension itself. Thanks.

Add unit tests

Basic druid functions (buttons, text etc) should be covered by tests

More chaining calls

Rework API to add more ability for chaining calls

Example with scrolls:

self.druid:new_scroll("scroll_with_points", "scroll_with_points_content")
	:set_points({})
	:set_extra_stretch_size(100)

Text update

Scale mode: not only downscale, add text trim

Add scroll for trimmed text

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.