Permalink
Browse files

Headers for toggler settings

  • Loading branch information...
1 parent 4854927 commit 95f99b6d456d941203ffeca6a9ef3399beecd43b @grapefrukt committed May 23, 2012
Showing with 19 additions and 9 deletions.
  1. +1 −1 juicy-breakout.as3proj
  2. +12 −2 src/com/grapefrukt/games/juicy/Settings.as
  3. +6 −6 src/com/grapefrukt/games/juicy/Toggler.as
View
@@ -42,7 +42,7 @@
<option linkReport="" />
<option loadExterns="" />
<option staticLinkRSL="True" />
- <option additional="-keep-as3-metadata min max o" />
+ <option additional="-keep-as3-metadata min max o header" />
<option compilerConstants="" />
<option minorVersion="" />
</build>
@@ -14,8 +14,10 @@ package com.grapefrukt.games.juicy {
static public const PADDLE_W:Number = 100;
static public const PADDLE_H:Number = 30;
+ [header("Colors")]
[o("91")] static public var EFFECT_SCREEN_COLORS :Boolean = false;
+ [header("Tweening")]
[o("A1")] static public var EFFECT_TWEENIN_ENABLED :Boolean = false;
[o("A2")] static public var EFFECT_TWEENIN_PROPERTY_Y :Boolean = true;
[o("A3")] static public var EFFECT_TWEENIN_PROPERTY_ROTATION :Boolean = false;
@@ -27,6 +29,7 @@ package com.grapefrukt.games.juicy {
[min("0")] [max("3")]
[o("A7")] static public var EFFECT_TWEENIN_EQUATION :int = 0;
+ [header("Stretch and squeeze")]
[o("B1")] static public var EFFECT_PADDLE_STRETCH :Boolean = false;
[o("B2")] static public var EFFECT_BALL_EXTRA_SCALE :Boolean = false;
@@ -39,10 +42,12 @@ package com.grapefrukt.games.juicy {
[o("C1")] static public var EFFECT_BLOCK_JELLY :Boolean = false;
[o("C2")] static public var EFFECT_BOUNCY_LINES_ENABLED :Boolean = false;
+ [header("Sounds")]
[o("E1")] static public var SOUND_WALL :Boolean = false;
[o("E2")] static public var SOUND_BLOCK :Boolean = false;
[o("E3")] static public var SOUND_PADDLE :Boolean = false;
+ [header("Particles")]
[o("G0")] static public var EFFECT_PARTICLE_BALL_COLLISION :Boolean = false;
[min("0")] [max("3")]
@@ -62,10 +67,12 @@ package com.grapefrukt.games.juicy {
[o("G11")] static public var EFFECT_BALL_TRAIL_SCALE :Boolean = false;
[o("G12")] static public var EFFECT_BALL_TRAIL_LENGTH :int = 30;
+ [header("Screen shake")]
[o("H0")] static public var EFFECT_SCREEN_SHAKE :Boolean = false;
[min("0")] [max("1")]
[o("H1")] static public var EFFECT_SCREEN_SHAKE_POWER :Number = .5;
+ [header("Personality")]
[o("I1")] static public var EFFECT_PADDLE_FACE :Boolean = false;
[o("I2")] static public var EFFECT_PADDLE_LOOK_AT_BALL :Boolean = false;
[min("1")] [max("100")]
@@ -75,10 +82,15 @@ package com.grapefrukt.games.juicy {
[min("10")] [max("60")]
[o("I5")] static public var EFFECT_PADDLE_EYE_SEPARATION :int = 25;
+ [header("Finish him")]
[o("J1")] static public var EFFECT_SCREEN_COLOR_GLITCH :Boolean = false;
[o("J2")] static public var POWERUP_SLICER_BALL :Boolean = false;
[o("J3")] static public var SOUND_MUSIC :Boolean = false;
+ [header("Other")]
+ [min("0")] [max("1")]
+ static public var NUM_BALLS :int = 1;
+
[min("0")] [max("20")]
static public const EFFECT_BLOCK_SHATTER_ROTATION :Number = 5;
[min("0")] [max("5")]
@@ -90,8 +102,6 @@ package com.grapefrukt.games.juicy {
[min("1")] [max("100")]
static public const EFFECT_BOUNCY_LINES_WIDTH :Number = 20;
- [min("0")] [max("1")]
- static public var NUM_BALLS :int = 1;
static public const BALL_MAX_VELOCITY :Number = 5;
static public const BALL_MIN_VELOCITY :Number = 4;
@@ -53,9 +53,8 @@ package com.grapefrukt.games.juicy {
for each (tag in variable.metadata.(@name == "comment")) property.comment = tag.arg.@value;
for each (tag in variable.metadata.(@name == "max")) property.max = tag.arg.@value;
for each (tag in variable.metadata.(@name == "min")) property.min = tag.arg.@value;
- for each (tag in variable.metadata.(@name == "o")) {
- property.order = tag.arg.@value;
- }
+ for each (tag in variable.metadata.(@name == "o")) property.order = tag.arg.@value;
+ for each (tag in variable.metadata.(@name == "header")) property.header = tag.arg.@value;
_properties.push(property);
}
@@ -74,14 +73,14 @@ package com.grapefrukt.games.juicy {
for each (property in _properties) {
//var groupName:String = getGroupName(property.name);
- var groupName:String = property.order.substr(0, 1);
+ //var groupName:String = property.order.substr(0, 1);
//trace(window ? window.title : "null", groupName);
- if (!window || window.title != groupName) {
+ if (!window || window.title != property.header && property.header != "") {
if (window) {
window.content.getChildAt(0).height = DisplayObjectContainer(window.content.getChildAt(0)).numChildren * 30;
}
- accordion.addWindowAt(groupName, accordion.numWindows);
+ accordion.addWindowAt(property.header, accordion.numWindows);
window = accordion.getWindowAt(accordion.numWindows - 1);
var container:VBox = new VBox(window.content, 10, 10);
}
@@ -172,4 +171,5 @@ class Property {
public var max:Number;
public var min:Number;
public var order:String = "";
+ public var header:String = "";
}

0 comments on commit 95f99b6

Please sign in to comment.