mirror of
https://github.com/FullScreenShenanigans/MenuGraphr.git
synced 2026-08-12 02:18:35 -07:00
Moved killNormal into IGameStartr
This commit is contained in:
Vendored
+1
-5
@@ -6,6 +6,7 @@ declare module MenuGraphr {
|
||||
ObjectMaker: ObjectMakr.IObjectMakr;
|
||||
TimeHandler: TimeHandlr.ITimeHandlr;
|
||||
addThing(thing: IThing | string | any[], left?: number, top?: number): IThing;
|
||||
killNormal(thing: IThing): void;
|
||||
setHeight(thing: IThing, height: number);
|
||||
setWidth(thing: IThing, width: number);
|
||||
}
|
||||
@@ -188,13 +189,8 @@ declare module MenuGraphr {
|
||||
paddingY: number;
|
||||
}
|
||||
|
||||
export interface IKillFunction {
|
||||
(thing: IThing): void;
|
||||
}
|
||||
|
||||
export interface IMenuGraphrSettings {
|
||||
GameStarter: IGameStartr;
|
||||
killNormal: IKillFunction;
|
||||
schemas?: {
|
||||
[i: string]: IMenuSchema;
|
||||
};
|
||||
|
||||
@@ -48,14 +48,11 @@ module MenuGraphr {
|
||||
[i: string]: boolean
|
||||
};
|
||||
|
||||
private killNormal: IKillFunction;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
constructor(settings: IMenuGraphrSettings) {
|
||||
this.GameStarter = settings.GameStarter;
|
||||
this.killNormal = settings.killNormal;
|
||||
|
||||
this.schemas = settings.schemas || {};
|
||||
this.aliases = settings.aliases || {};
|
||||
@@ -256,7 +253,7 @@ module MenuGraphr {
|
||||
delete this.menus[child.name];
|
||||
}
|
||||
|
||||
this.killNormal(child);
|
||||
this.GameStarter.killNormal(child);
|
||||
this.deleteMenuChildren(name);
|
||||
|
||||
if (child.onMenuDelete) {
|
||||
@@ -1200,7 +1197,7 @@ module MenuGraphr {
|
||||
this.GameStarter.shiftVert(character, -this.GameStarter.unitsize);
|
||||
|
||||
if (character.top < menu.top + (menu.textYOffset - 1) * this.GameStarter.unitsize) {
|
||||
this.killNormal(character);
|
||||
this.GameStarter.killNormal(character);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user