Skip to content

Commit

Permalink
Added the build form TSX and each of its initial panels. See #45
Browse files Browse the repository at this point in the history
  • Loading branch information
MKHenson committed Aug 15, 2016
1 parent d87939f commit 462011c
Show file tree
Hide file tree
Showing 9 changed files with 211 additions and 2 deletions.
75 changes: 75 additions & 0 deletions lib/definitions/generated/hatchery-editor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5694,6 +5694,81 @@ declare module Animate {
onKeyDown(e: any): void;
}
}
declare module Animate {
interface IOptionsBuild extends IReactWindowProps {
}
/**
* A component for editing the build properties
*/
class OptionsBuild extends React.Component<IOptionsUser, any> {
static defaultProps: IOptionsBuild;
/**
* Creates a new instance
*/
constructor(props: IOptionsBuild);
/**
* Draws the options JSX
* @returns {JSX.Element}
*/
render(): JSX.Element;
}
}
declare module Animate {
interface IOptionsUser {
}
/**
* A component for editing the user properties
*/
class OptionsUser extends React.Component<IOptionsUser, any> {
static defaultProps: IOptionsUser;
/**
* Creates a new instance
*/
constructor(props: IOptionsUser);
/**
* Draws the options JSX
* @returns {JSX.Element}
*/
render(): JSX.Element;
}
}
declare module Animate {
interface IOptionsProject extends IReactWindowProps {
}
/**
* A component for editing the project properties
*/
class OptionsProject extends React.Component<IOptionsUser, any> {
static defaultProps: IOptionsProject;
/**
* Creates a new instance
*/
constructor(props: IOptionsProject);
/**
* Draws the options JSX
* @returns {JSX.Element}
*/
render(): JSX.Element;
}
}
declare module Animate {
interface IOptionsForm extends IReactWindowProps {
}
/**
* A form for editing various project/user options
*/
class OptionsForm extends ReactWindow<IOptionsForm> {
static defaultProps: IOptionsForm;
/**
* Creates a new instance
*/
constructor(props: IOptionsForm);
/**
* Gets the content JSX for the window.
*/
getContent(): React.ReactNode;
}
}
declare module Animate {
/**
* Use this form to set the project meta and update build versions.
Expand Down
29 changes: 29 additions & 0 deletions lib/gui/forms/options-form/options-build.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module Animate {

export interface IOptionsBuild extends IReactWindowProps {
}

/**
* A component for editing the build properties
*/
export class OptionsBuild extends React.Component<IOptionsUser, any> {
static defaultProps: IOptionsBuild = {
}

/**
* Creates a new instance
*/
constructor( props : IOptionsBuild) {
super(props)
}

/**
* Draws the options JSX
* @returns {JSX.Element}
*/
render() : JSX.Element {
return <div>
</div>
}
}
}
43 changes: 43 additions & 0 deletions lib/gui/forms/options-form/options-form.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module Animate {

export interface IOptionsForm extends IReactWindowProps {
}

/**
* A form for editing various project/user options
*/
export class OptionsForm extends ReactWindow<IOptionsForm> {
static defaultProps: IOptionsForm = {
controlBox: true,
canResize: true,
autoCenter: true,
title: 'Options Form',
modal: true
}

/**
* Creates a new instance
*/
constructor( props : IOptionsForm) {
super(props)
}

/**
* Gets the content JSX for the window.
*/
getContent() : React.ReactNode {
return <Tab panes={[
<TabPane label="Project" showCloseButton={false}>
<OptionsProject />
</TabPane>,
<TabPane label="User" showCloseButton={false}>
<OptionsUser />
</TabPane>,
<TabPane label="Build" showCloseButton={false}>
<OptionsBuild />
</TabPane>
]}
/>
}
}
}
29 changes: 29 additions & 0 deletions lib/gui/forms/options-form/options-project.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module Animate {

export interface IOptionsProject extends IReactWindowProps {
}

/**
* A component for editing the project properties
*/
export class OptionsProject extends React.Component<IOptionsUser, any> {
static defaultProps: IOptionsProject = {
}

/**
* Creates a new instance
*/
constructor( props : IOptionsProject) {
super(props)
}

/**
* Draws the options JSX
* @returns {JSX.Element}
*/
render() : JSX.Element {
return <div>
</div>
}
}
}
29 changes: 29 additions & 0 deletions lib/gui/forms/options-form/options-user.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module Animate {

export interface IOptionsUser {
}

/**
* A component for editing the user properties
*/
export class OptionsUser extends React.Component<IOptionsUser, any> {
static defaultProps: IOptionsUser = {
}

/**
* Creates a new instance
*/
constructor( props : IOptionsUser) {
super(props)
}

/**
* Draws the options JSX
* @returns {JSX.Element}
*/
render() : JSX.Element {
return <div>
</div>
}
}
}
Empty file.
3 changes: 1 addition & 2 deletions lib/gui/toolbar/toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ module Animate {
<ToolbarButton onChange={(e) => {
this.onRun() }} label="Run" imgUrl="media/play.png" />
<ToolbarButton onChange={(e) => {
//Animate.BuildOptionsForm.getSingleton().show()
ReactWindow.show(MessageBox, { type: AttentionType.ERROR, message : "This is a test" } as IMessageBoxProps);
ReactWindow.show(OptionsForm, { } as IOptionsForm);
}} label="Settings" imgUrl="media/build.png" />
<ToolbarButton onChange={(e) => {
Animate.CanvasTab.getSingleton().addSpecialTab('HTML', Animate.CanvasTabType.HTML ) }} label="HTML" imgUrl="media/html.png" />
Expand Down
1 change: 1 addition & 0 deletions lib/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ body {
width:50%;
}

@import 'gui/forms/options-form/style.scss';
@import 'gui/window/style.scss';
@import 'gui/list/style.scss';
@import 'gui/logger/style.scss';
Expand Down
4 changes: 4 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@
"lib/gui/toolbar/toolbar-buttons/toolbar-color-picker.ts",
"lib/gui/toolbar/toolbar-buttons/toolbar-drop-down.ts",
"lib/gui/forms/ok-cancel-form.ts",
"lib/gui/forms/options-form/options-build.tsx",
"lib/gui/forms/options-form/options-user.tsx",
"lib/gui/forms/options-form/options-project.tsx",
"lib/gui/forms/options-form/options-form.tsx",
"lib/gui/forms/options-form/build-options-form.ts",
"lib/gui/forms/file-viewer/file-viewer.ts",
"lib/gui/forms/message-box/message-box.tsx",
Expand Down

0 comments on commit 462011c

Please sign in to comment.