Skip to content

Instantly share code, notes, and snippets.

View Kalinovych's full-sized avatar

Alexander Kalinovych

View GitHub Profile
package starling.extensions.DistanceFieldFont
{
import flash.geom.Rectangle;
import flash.utils.Dictionary;
import starling.display.Image;
import starling.text.BitmapChar;
import starling.textures.Texture;
import starling.textures.TextureSmoothing;
import starling.utils.HAlign;
@Kalinovych
Kalinovych / SecurityPanelUtil.as
Created September 1, 2014 16:30
My little util to show Flash security settings panel and handle it close
/*
* Copyright (c) 2014+
* @author Alexander Kalinovych
*/
package flashrush.utils {
import flash.display.InteractiveObject;
import flash.display.Sprite;
import flash.display.Stage;
import flash.events.Event;
import flash.events.FocusEvent;
@Kalinovych
Kalinovych / AS3 Linked List.vt
Last active August 29, 2015 14:05
LinkedList Velocity Template for Intellij Idea
#parse("ActionScript File Header.as")
#set($T='*')
#if(${GenericClass} && ${GenericClass} != "")#set($T=${GenericClass})#end
#set( $NodeType = 'LLItemNode' )
#if ( ${T} != "") #set( $NodeType = "${T}Node" ) #end
## force capitalize first char
#set( $NodeType = "$NodeType.toString().substring(0,1).toUpperCase()$NodeType.toString().substring(1)" )
@Kalinovych
Kalinovych / EnumFlagDrawer.cs
Last active March 24, 2020 17:46
[Unity3D Editor] PropertyDrawer for [EnumFlag] attribute - draws an expandable vertical column of toggle buttons filled by your Enum names.
using UnityEditor;
using UnityEngine;
[CustomPropertyDrawer(typeof(EnumFlagAttribute))]
public class EnumFlagDrawer : PropertyDrawer
{
private static bool foldout = false;
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{