Code Monkey home page Code Monkey logo

buttonex's Introduction

ButtonEx

Overview

Button with extended feature for uGUI.

image

  • 再フォーカス時のクリック判定を無効できます.
    • スクリプト定義シンボルに DISALLOW_REFOCUS を追加してください.
  • エディタにて、スペースキーやエンターキーを押した時に、ボタンがクリック不可能な状態にもかかわらずクリックされる問題を修正します.
    • 実際にレイキャストを飛ばして、本当に押せるかどうかを判定します.
  • ESCキーでClickイベントを発火できます(Androidバックキー対応).
    • Invoke On Esc Key を有効化してください.
    • 実際にレイキャストを飛ばして、本当に押せるかどうかを判定します.
    • クリック可能かつ最前面にあるボタンのみEscキーが反応します.
    • シーンビューより、ESCキー対応ボタンをギズモで確認できます.
      image
  • 以下のイベントタイプを追加します.
    • Press : ボタンを押したときのイベントです.
      • Press-Repeat( Repeat )を有効にすると、ボタンを押し続けた時に繰り返しPressイベントを発火します.
    • Hold : ボタンを一定時間押し続けたとき(長押し)のイベントです
      • Holdイベントを発火すると、Press-Repeatは停止します.
  • コンテキストメニューより、既存のButtonコンポーネントをButtonExへ変換できます.
    • ButtonEx > Button の変換もできます.
      image

Requirement

  • Unity5.3+ (included Unity 2017.x)
  • No other SDK is required.

Usage

  1. Download ButtonEx.unitypackage and install on your unity project.
  2. AddComponent ButtonEx to the GameObject.
  3. Enjoy!

Demo

WebGL: https://developer.cloud.unity3d.com/share/WkmVXpqkkm/

Release Notes

ver.1.1.0:

  • Fixed: デモシーンのアスペクト比を修正
  • Changed: 再フォーカス時クリック判定について、スクリプト定義シンボル DISALLOW_REFOCUS で切り替えられるように変更しました.

ver.1.0.0:

  • 再フォーカス時のクリック判定を無効にします.
  • エディタにて、スペースキーやエンターキーを押した時に、ボタンがクリック不可能な状態にもかかわらずクリックされる問題を修正します.
  • ESCキーでClickイベントを発火できます(Androidバックキー対応).
  • 以下のイベントタイプを追加します.
    • Press : ボタンを押したときのイベントです.
    • Hold : ボタンを一定時間押し続けたとき(長押し)のイベントです
  • コンテキストメニューより、既存のButtonコンポーネントをButtonExへ変換できます.

See Also

buttonex's People

Contributors

bian-sh avatar

Watchers

 avatar

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.