-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [add] Add comment for acceptance of maps. * [fix] Fix a bug for the blocking animation. * [update] Improve the game performance in fog of war. * [fxi] Fix #102.
- Loading branch information
1 parent
db77910
commit 0b4bca9
Showing
32 changed files
with
575 additions
and
377 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<e:Skin width="960" height="540" xmlns:e="http://ns.egret.com/eui" xmlns:GameUi="TinyWars.GameUi.*" | ||
xmlns:w="http://ns.egret.com/wing"> | ||
<GameUi:UiImage left="0" right="0" top="0" bottom="0" source="semi_transparent" /> | ||
<e:Group width="430" height="300" horizontalCenter="0" verticalCenter="0"> | ||
<GameUi:UiImage source="c04_t01_s02_f01" scale9Grid="9,9,2,2" anchorOffsetX="0" anchorOffsetY="0" alpha="0.8" | ||
left="0" right="0" top="0" bottom="0" /> | ||
<GameUi:UiLabel id="_labelTitle" text="过审" textColor="0xffffff" y="12" horizontalCenter="0" size="24" /> | ||
<GameUi:UiLabel id="_labelTips" text="请输入您的评价和改进意见,可留空" textColor="0xFFFFFF" size="18" left="10" right="10" | ||
top="50" wordWrap="true" /> | ||
<GameUi:UiTextInput id="_inputReason" anchorOffsetX="0" anchorOffsetY="0" maxChars="200" left="10" right="10" | ||
height="160" top="90"> | ||
<GameUi:skinName> | ||
<e:Skin width="100" height="30"> | ||
<e:Image source="c08_t06_s01_f01" left="0" right="0" bottom="0" /> | ||
<e:EditableText id="textDisplay" size="24" left="0" right="0" textColor="0xffffff" top="0" | ||
bottom="0" multiline="true" text="" /> | ||
<e:Label id="promptDisplay" size="24" touchEnabled="false" left="0" right="0" text="" height="30" | ||
textColor="0x808080" /> | ||
</e:Skin> | ||
</GameUi:skinName> | ||
</GameUi:UiTextInput> | ||
<GameUi:UiButton id="_btnCancel" label="取消" horizontalCenter="-80" bottom="15"> | ||
<GameUi:skinName> | ||
<e:Skin states="up,down,disabled"> | ||
<e:Image width="100%" height="100%" /> | ||
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="25" bold="true" | ||
textColor="0xff0000" /> | ||
</e:Skin> | ||
</GameUi:skinName> | ||
</GameUi:UiButton> | ||
<GameUi:UiButton id="_btnConfirm" label="确定" horizontalCenter="80" bottom="15"> | ||
<e:skinName> | ||
<e:Skin states="up,down,disabled"> | ||
<e:Image width="100%" height="100%" /> | ||
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0" size="25" bold="true" | ||
textColor="0x00ff00" /> | ||
</e:Skin> | ||
</e:skinName> | ||
</GameUi:UiButton> | ||
</e:Group> | ||
</e:Skin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
|
||
namespace TinyWars.MapManagement { | ||
import Lang = Utility.Lang; | ||
|
||
export class MmAcceptMapPanel extends GameUi.UiPanel { | ||
protected readonly _LAYER_TYPE = Utility.Types.LayerType.Hud3; | ||
protected readonly _IS_EXCLUSIVE = true; | ||
|
||
private static _instance: MmAcceptMapPanel; | ||
|
||
private _labelTitle : GameUi.UiLabel; | ||
private _labelTips : GameUi.UiLabel; | ||
private _inputReason : GameUi.UiTextInput; | ||
private _btnCancel : GameUi.UiButton; | ||
private _btnConfirm : GameUi.UiButton; | ||
|
||
public static show(): void { | ||
if (!MmAcceptMapPanel._instance) { | ||
MmAcceptMapPanel._instance = new MmAcceptMapPanel(); | ||
} | ||
MmAcceptMapPanel._instance.open(); | ||
} | ||
|
||
public static hide(): void { | ||
if (MmAcceptMapPanel._instance) { | ||
MmAcceptMapPanel._instance.close(); | ||
} | ||
} | ||
|
||
public constructor() { | ||
super(); | ||
|
||
this.skinName = "resource/skins/mapManagement/MmAcceptMapPanel.exml"; | ||
this._setAutoAdjustHeightEnabled(); | ||
this._setTouchMaskEnabled(); | ||
} | ||
|
||
protected _onFirstOpened(): void { | ||
this._uiListeners = [ | ||
{ ui: this._btnCancel, callback: this._onTouchedBtnCancel, }, | ||
{ ui: this._btnConfirm, callback: this._onTouchedBtnConfirm, }, | ||
]; | ||
} | ||
|
||
protected _onOpened(): void { | ||
this._btnConfirm.label = Lang.getText(Lang.Type.B0026); | ||
this._btnCancel.label = Lang.getText(Lang.Type.B0154); | ||
this._labelTitle.text = Lang.getText(Lang.Type.B0296); | ||
this._labelTips.text = Lang.getText(Lang.Type.A0105); | ||
} | ||
|
||
private _onTouchedBtnCancel(e: egret.TouchEvent): void { | ||
MmAcceptMapPanel.hide(); | ||
} | ||
|
||
private _onTouchedBtnConfirm(e: egret.TouchEvent): void { | ||
const war = MapEditor.MeManager.getWar(); | ||
WarMap.WarMapProxy.reqReviewMap(war.getDesignerUserId(), war.getSlotIndex(), war.getModifiedTime(), true, this._inputReason.text); | ||
this.close(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.