Skip to content

Commit

Permalink
Add tweening
Browse files Browse the repository at this point in the history
Fixed List vertical sliding issue
Split GUISprite class to GUIObject and GUISprite
  • Loading branch information
Alaa-eddine committed Apr 26, 2015
1 parent f456849 commit 4c83a35
Show file tree
Hide file tree
Showing 27 changed files with 787 additions and 698 deletions.
1 change: 1 addition & 0 deletions EZGUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<Content Include="js\pixi3.dev.js" />
<TypeScriptCompile Include="src\components\Label.ts" />
<TypeScriptCompile Include="src\components\Slider.ts" />
<TypeScriptCompile Include="src\GUIObject.ts" />
<TypeScriptCompile Include="src\tween\Easing.ts" />
<TypeScriptCompile Include="src\tween\Interpolation.ts" />
<TypeScriptCompile Include="src\tween\Tween.ts" />
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ Important
The code in this repository is still in developement, and some breaking changes may occure


Features
Features.
--------
* Flexible configuration : EZGUI use a flexible JSON configuration format for theme an gui definitions
* Themes : a default theme is provided but you can create your own custom theme.
* Tweening
* Extendable : you can easily create your own components


Expand Down
10 changes: 5 additions & 5 deletions assets/kenney-theme/kenney-theme.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"__config__": {
"name": "kenney-theme",
"name": "kenney",
"resources": [
"./kenney-atlas.json",
"./images/bg.png"
"./kenney-atlas.json"
]
},

"default": {
"scale": 0.5,
"bg": "./images/bg.png",
"bg": "wnd-grey-bg.png",
"padding" : 2,
"bgPadding": 6,
"corner": "wnd-grey-corner.png",
"line": "wnd-grey-line.png",
Expand All @@ -19,7 +19,7 @@
"color": "black"
}
},
"Window": {
"Dialog": {
"bgPadding": 5,
"bg": "wnd-grey-bg.png",
"corner": "wnd-grey-corner.png",
Expand Down
2 changes: 1 addition & 1 deletion assets/metalworks-theme/metalworks-theme.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"__config__": {
"name": "metalworks-theme",
"name": "metalworks",
"resources": [
"./images/header-bg.png",
"./images/bg.png",
Expand Down
43 changes: 26 additions & 17 deletions dist/EZGUI.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ declare module EZGUI {
private _onStopCallback;
constructor(object: any);
to(properties: any, duration: any): Tween;
start(time: any): Tween;
start(time?: any): Tween;
stop(): Tween;
stopChainedTweens(): void;
delay(amount: any): Tween;
Expand Down Expand Up @@ -190,7 +190,29 @@ declare module EZGUI {
}
}
declare module EZGUI {
class GUISprite extends EZGUI.Compatibility.GUIDisplayObjectContainer {
class GUIObject extends EZGUI.Compatibility.GUIDisplayObjectContainer {
guiID: string;
userData: any;
container: PIXI.DisplayObjectContainer;
guiParent: GUISprite;
constructor();
protected setupEvents(): void;
originalAddChildAt(child: any, index: any): PIXI.DisplayObject;
originalAddChild(child: any): PIXI.DisplayObject;
addChild(child: any): PIXI.DisplayObject;
removeChild(child: any): PIXI.DisplayObject;
mouseInObj(event: any, guiSprite: any): boolean;
canTrigger(event: any, guiSprite: any): boolean;
on(event: any, fn: any, context?: any): void;
off(event: any, fn?: any, context?: any): void;
preUpdate(): void;
update(): void;
postUpdate(): void;
destroy(): void;
}
}
declare module EZGUI {
class GUISprite extends GUIObject {
_settings: any;
themeId: any;
guiID: string;
Expand All @@ -201,30 +223,16 @@ declare module EZGUI {
dragXInterval: number[];
dragYInterval: number[];
theme: Theme;
container: PIXI.DisplayObjectContainer;
protected textObj: any;
guiParent: GUISprite;
text: string;
constructor(_settings: any, themeId: any);
protected setupEvents(): void;
setDraggable(val?: boolean): void;
protected handleEvents(): void;
protected draw(): void;
protected drawText(): void;
originalAddChildAt(child: any, index: any): PIXI.DisplayObject;
originalAddChild(child: any): PIXI.DisplayObject;
addChild(child: any): PIXI.DisplayObject;
removeChild(child: any): PIXI.DisplayObject;
createChild(childSettings: any, order?: any): any;
mouseInObj(event: any, guiSprite: any): boolean;
canTrigger(event: any, guiSprite: any): boolean;
setState(state?: string): void;
on(event: any, fn: any, context?: any): void;
off(event: any, fn?: any, context?: any): void;
preUpdate(): void;
update(): void;
postUpdate(): void;
destroy(): void;
animateTo(x: any, y: any, time?: number, easing?: (k: any) => any, callback?: any): void;
protected getFrameConfig(config: any, state: any): any;
protected getComponentConfig(component: any, part: any, side: any, state: any): any;
protected createThemeCorner(settings: any, part: any, side: any, state: any): PIXI.Sprite;
Expand Down Expand Up @@ -256,6 +264,7 @@ declare module EZGUI.Component {
constructor(_settings: any, themeId: any);
protected handleEvents(): void;
protected draw(): void;
protected drawText(): void;
}
}
declare module EZGUI.Component {
Expand Down
Loading

0 comments on commit 4c83a35

Please sign in to comment.