Commit 87b3cf08 authored by zhangjinzhou's avatar zhangjinzhou

代码暂存

parent c5701461
...@@ -99,6 +99,10 @@ ...@@ -99,6 +99,10 @@
{ {
"keys": "shopPanel_table_prop_png,shopPanel_bg_png,shopPanel_table_seed_png,shopPanel_table_prop_dis_png,shopPanel_table_seed_dis_png,shop_item_bg_png,shop_item_btn_png,shop_item_btn_dis_png,shopBuy_bg_png,shopBuy_btn_png,shop_prop_none_png,shop_prop_done_png,shop_prop_buy_png,shopBuy_btn1_png", "keys": "shopPanel_table_prop_png,shopPanel_bg_png,shopPanel_table_seed_png,shopPanel_table_prop_dis_png,shopPanel_table_seed_dis_png,shop_item_bg_png,shop_item_btn_png,shop_item_btn_dis_png,shopBuy_bg_png,shopBuy_btn_png,shop_prop_none_png,shop_prop_done_png,shop_prop_buy_png,shopBuy_btn1_png",
"name": "shop" "name": "shop"
},
{
"name": "preload",
"keys": "option_left_png,option_right_png,option_scrollbar_png,ex_panda_png,ex_buybtn_png,ex_close_png"
} }
], ],
"resources": [ "resources": [
...@@ -1251,6 +1255,36 @@ ...@@ -1251,6 +1255,36 @@
"url": "assets/common/itemTip.png", "url": "assets/common/itemTip.png",
"type": "image", "type": "image",
"name": "itemTip_png" "name": "itemTip_png"
},
{
"name": "option_left_png",
"type": "image",
"url": "assets/index_scene/planting/option/option_left.png"
},
{
"name": "option_right_png",
"type": "image",
"url": "assets/index_scene/planting/option/option_right.png"
},
{
"name": "option_scrollbar_png",
"type": "image",
"url": "assets/index_scene/planting/option/option_scrollbar.png"
},
{
"name": "ex_panda_png",
"type": "image",
"url": "assets/exchange_panel/ex_panda.png"
},
{
"name": "ex_buybtn_png",
"type": "image",
"url": "assets/exchange_panel/ex_buybtn.png"
},
{
"name": "ex_close_png",
"type": "image",
"url": "assets/exchange_panel/ex_close.png"
} }
] ]
} }
\ No newline at end of file
{ {
"skins": {}, "skins": {},
"autoGenerateExmlsList": true, "autoGenerateExmlsList": true,
"exmls": [ "exmls": [
"resource/skins/Component/BarSkin.exml", "resource/skins/Component/BarSkin.exml",
"resource/skins/Component/ProgressNumSkin.exml", "resource/skins/Component/ProgressNumSkin.exml",
"resource/skins/Component/TimeProgressBarSkin.exml", "resource/skins/Component/TimeProgressBarSkin.exml",
"resource/skins/ExchangeBuyPanelSkin.exml", "resource/skins/ExchangeBuyPanelSkin.exml",
"resource/skins/ExchangedPanelSkin.exml", "resource/skins/ExchangedPanelSkin.exml",
"resource/skins/ExchangeItemSkin.exml", "resource/skins/ExchangeItemSkin.exml",
"resource/skins/ExchangePanelSkin.exml", "resource/skins/ExchangePanelSkin.exml",
"resource/skins/ExchangeSceneSkin.exml", "resource/skins/ExchangeSceneSkin.exml",
"resource/skins/GameGroupSkin.exml", "resource/skins/GameGroupSkin.exml",
"resource/skins/GuideSkin.exml", "resource/skins/GuideSkin.exml",
"resource/skins/IntroducePanelSkin.exml", "resource/skins/IntroducePanelSkin.exml",
"resource/skins/LoadingSceneSkin.exml", "resource/skins/LoadingSceneSkin.exml",
"resource/skins/LoadingSkin.exml", "resource/skins/LoadingSkin.exml",
"resource/skins/MainSceneSkin.exml", "resource/skins/MainSceneSkin.exml",
"resource/skins/MainUISkin.exml", "resource/skins/MainUISkin.exml",
"resource/skins/MedalPanelSkin.exml", "resource/skins/MedalPanelSkin.exml",
"resource/skins/MedalsPanelSkin.exml", "resource/skins/MedalsPanelSkin.exml",
"resource/skins/NewUserPanelSkin.exml", "resource/skins/NewUserPanelSkin.exml",
"resource/skins/Objs/CropSkin.exml", "resource/skins/Objs/CropSkin.exml",
"resource/skins/Objs/LandSkin.exml", "resource/skins/Objs/LandSkin.exml",
"resource/skins/Objs/MedalSkin.exml", "resource/skins/Objs/MedalSkin.exml",
"resource/skins/Objs/OptionPanelSkin.exml", "resource/skins/Objs/OptionPanelSkin.exml",
"resource/skins/OldUserPanelSkin.exml", "resource/skins/OldUserPanelSkin.exml",
"resource/skins/RoomSceneSkin.exml", "resource/skins/RoomSceneSkin.exml",
"resource/skins/RulePanelSkin.exml", "resource/skins/RulePanelSkin.exml",
"resource/skins/SelledPanelSkin.exml", "resource/skins/SelledPanelSkin.exml",
"resource/skins/SellPanelSkin.exml", "resource/skins/SellPanelSkin.exml",
"resource/skins/SellRecordItemSkin.exml", "resource/skins/SellRecordItemSkin.exml",
"resource/skins/SellRecordSkin.exml", "resource/skins/SellRecordSkin.exml",
"resource/skins/ShopBuyPanelSkin.exml", "resource/skins/ShopBuyPanelSkin.exml",
"resource/skins/ShopItemSkin.exml", "resource/skins/ShopItemSkin.exml",
"resource/skins/ShopPanelSkin.exml", "resource/skins/ShopPanelSkin.exml",
"resource/skins/TaskItemSkin.exml", "resource/skins/TaskItemSkin.exml",
"resource/skins/TaskPanelSkin.exml", "resource/skins/TaskPanelSkin.exml",
"resource/skins/TaskToastSkin.exml", "resource/skins/TaskToastSkin.exml",
"resource/skins/ToastPanelSkin.exml", "resource/skins/ToastPanelSkin.exml",
"resource/skins/ui/IconButtonSkin.exml", "resource/skins/ui/IconButtonSkin.exml",
"resource/skins/ui/ProgressBarSkin.exml", "resource/skins/ui/ProgressBarSkin.exml",
"resource/skins/UnlockPanelSkin.exml", "resource/skins/UnlockPanelSkin.exml",
"resource/skins/WareHouseCropItemSkin.exml", "resource/skins/WareHouseCropItemSkin.exml",
"resource/skins/WareHouseSeedItemSkin.exml", "resource/skins/WareHouseSeedItemSkin.exml",
"resource/skins/WareHouseSkin.exml" "resource/skins/WareHouseSkin.exml"
], ],
"path": "resource/default.thm.json" "path": "resource/default.thm.json"
} }
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="CreditsTip" width="750" height="612" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="CreditsTip" width="750" height="646" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Button id="closeBtn" label="" y="0" x="571"> <e:Button id="closeBtn" label="" y="0" x="571" visible="false">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="closeBtn_png" source.down="closeBtn_png" source.disabled="closeBtn_png"/> <e:Image width="100%" height="100%" source="closeBtn_png" source.down="closeBtn_png" source.disabled="closeBtn_png"/>
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Image y="102" source="ex_bg_png" touchEnabled="false" horizontalCenter="0"/> <e:Image y="0" source="ex_bg_png" touchEnabled="false" x="156"/>
<e:Group id="propGroup" y="256" anchorOffsetX="0" width="437" horizontalCenter="0.5"> <e:Group id="propGroup" y="126" anchorOffsetX="0" width="437" horizontalCenter="52.5">
<e:Group id="sp_1_group" x="0" y="0" width="38" height="67" visible="false"> <e:Group id="sp_1_group" x="0" y="0" width="38" height="67" visible="false">
<e:Image y="0" anchorOffsetX="0" width="-78.58" horizontalCenter="0" source="ex_sp1_png"/> <e:Image y="0" anchorOffsetX="0" width="-78.58" horizontalCenter="0" source="ex_sp1_png"/>
<e:Label id="sp_1_label" text="0/0" y="48.8" size="18" horizontalCenter="0" textColor="0xffffff"/> <e:Label id="sp_1_label" text="0/0" y="48.8" size="18" horizontalCenter="0" textColor="0xffffff"/>
...@@ -40,10 +40,12 @@ ...@@ -40,10 +40,12 @@
<e:Label id="sp_6_label" text="0/0" y="48.8" size="18" horizontalCenter="0" textColor="0xFFFFFF"/> <e:Label id="sp_6_label" text="0/0" y="48.8" size="18" horizontalCenter="0" textColor="0xFFFFFF"/>
</e:Group> </e:Group>
</e:Group> </e:Group>
<e:Image id="btn" y="373" source="ex_btn_png" horizontalCenter="0"/> <e:Image id="btn" y="283" source="ex_btn_png" x="186"/>
<e:Label id="title" text="Title" y="200" size="27" horizontalCenter="0"/> <e:Image id="btn_1" y="283" x="350" source="ex_buybtn_png"/>
<e:Label id="introduce" text="商品介绍:商品介绍商品介绍商品介绍" y="473" textColor="0xb2ada8" size="20" anchorOffsetX="0" width="468" anchorOffsetY="0" height="73" horizontalCenter="0"/> <e:Image id="btn_2" y="283" x="518" source="ex_close_png"/>
<e:Label id="stock" text="剩余数量:0" y="555" textColor="0xB2ADA8" size="20" x="140"/> <e:Label id="title" text="Title" y="200" size="27" horizontalCenter="0" visible="false"/>
<e:Image id="titleImg" source="ex_titleImg_png" y="31" horizontalCenter="0" height="142" width="142"/> <e:Label id="introduce" text="商品介绍:商品介绍商品介绍商品介绍" y="473" textColor="0xb2ada8" size="20" anchorOffsetX="0" width="468" anchorOffsetY="0" height="73" horizontalCenter="0" visible="false"/>
<e:Image id="titleMask" source="ex_titleImg_png" y="31" horizontalCenter="0"/> <e:Label id="stock" text="剩余数量:0" y="555" textColor="0xB2ADA8" size="20" x="140" visible="false"/>
<e:Image id="titleImg" source="ex_titleImg_png" y="10" height="100" width="100" x="389"/>
<e:Image id="titleMask" source="ex_titleImg_png" y="10" horizontalCenter="64" width="100" height="100"/>
</e:Skin> </e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="OptionPanel" width="596" height="400" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="OptionPanel" width="610" height="214" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="option_panel_png" horizontalCenter="0" verticalCenter="0" alpha="0.8" top="0" bottom="0" right="0" left="0"/> <e:Image source="option_panel_png" verticalCenter="0" alpha="1" top="0" bottom="0" width="581" horizontalCenter="0" locked="true"/>
<e:Group id="chickBtn" x="23" y="35" touchChildren="false"> <e:Scroller id="petScroll" width="531" height="148" y="20.5" anchorOffsetX="0" anchorOffsetY="0" horizontalCenter="0">
<e:Image source="免费邮寄到家_png" x="0" y="0" visible="false"/> <e:Group x="-178" y="-26" height="148" width="531">
<e:Image source="option_chicken_png" x="92" anchorOffsetX="41" anchorOffsetY="56" y="74"/> <e:Group id="chickBtn" width="143" height="141" x="77" y="17">
</e:Group> <e:Image source="免费邮寄到家_png" scaleX="1" scaleY="1" visible="false"/>
<e:Image id="cattleBtn" source="option_cattle_png" anchorOffsetX="48.5" anchorOffsetY="58.5" x="298" bottom="235"/> <e:Image source="option_chicken_png" x="92" anchorOffsetX="41" anchorOffsetY="56" y="74"/>
<e:Image id="cornBtn" source="option_corn_png" x="460" anchorOffsetX="47.5" anchorOffsetY="65" bottom="235"/> </e:Group>
<e:Group id="wheatBtn" x="23" y="204" touchChildren="false"> <e:Group width="143" height="141" x="87" y="27">
<e:Image source="免费邮寄到家_png" x="-4" y="-2" visible="false"/> <e:Image id="cattleBtn" source="option_cattle_png" anchorOffsetX="48.5" anchorOffsetY="58.5" x="92" scaleX="1" scaleY="1" y="74"/>
<e:Image source="option_wheat_png" anchorOffsetX="43" anchorOffsetY="59" x="90.5" y="76"/> </e:Group>
</e:Group> <e:Group width="143" height="141" x="97" y="37">
<e:Image id="walnutBtn" anchorOffsetX="43" anchorOffsetY="59" source="option_walnut_png" horizontalCenter="155" verticalCenter="89" locked="true"/> <e:Image id="cornBtn" source="option_corn_png" x="92" anchorOffsetX="47.5" anchorOffsetY="65" scaleX="1" scaleY="1" y="74"/>
<e:Image id="potatoBtn" anchorOffsetX="43" anchorOffsetY="59" source="option_potato_png" horizontalCenter="-4" verticalCenter="90"/> </e:Group>
<e:Group id="wheatBtn" width="143" height="141" x="107" y="47">
<e:Image source="免费邮寄到家_png" scaleX="1" scaleY="1" visible="false"/>
<e:Image source="option_wheat_png" anchorOffsetX="43" anchorOffsetY="59" x="92" y="74"/>
</e:Group>
<e:Group width="143" height="141" x="117" y="57">
<e:Image id="walnutBtn" anchorOffsetX="43" anchorOffsetY="59" source="option_walnut_png" x="92" scaleX="1" scaleY="1" y="74"/>
</e:Group>
<e:Group width="143" height="141" x="127" y="67">
<e:Image id="potatoBtn" anchorOffsetX="43" anchorOffsetY="59" source="option_potato_png" x="92" scaleX="1" scaleY="1" y="74"/>
</e:Group>
<e:layout>
<e:HorizontalLayout horizontalAlign="left" verticalAlign="middle" gap="0"/>
</e:layout>
</e:Group>
</e:Scroller>
<e:Image id="leftBtn" source="option_left_png" verticalCenter="0" left="0" x="-40" y="66.5" scaleX="1" scaleY="1"/>
<e:Image id="rightBtn" source="option_right_png" right="0" verticalCenter="0"/>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -43,6 +43,9 @@ export default class OptionPanel extends Component { ...@@ -43,6 +43,9 @@ export default class OptionPanel extends Component {
public wheatBtn: eui.Group; public wheatBtn: eui.Group;
public walnutBtn: eui.Image; public walnutBtn: eui.Image;
public potatoBtn: eui.Image; public potatoBtn: eui.Image;
public leftBtn:eui.Image;
public rightBtn:eui.Image;
public petScroll:eui.Scroller;
private data = null; private data = null;
...@@ -76,7 +79,9 @@ export default class OptionPanel extends Component { ...@@ -76,7 +79,9 @@ export default class OptionPanel extends Component {
this.cattleBtn, this.cattleBtn,
this.cornBtn, this.cornBtn,
this.potatoBtn, this.potatoBtn,
this.walnutBtn this.walnutBtn,
this.leftBtn,
this.rightBtn
].forEach((v) => { ].forEach((v) => {
v.addEventListener(TouchEvent.TOUCH_TAP, this.onTap, this); v.addEventListener(TouchEvent.TOUCH_TAP, this.onTap, this);
}); });
...@@ -91,7 +96,9 @@ export default class OptionPanel extends Component { ...@@ -91,7 +96,9 @@ export default class OptionPanel extends Component {
this.cattleBtn, this.cattleBtn,
this.cornBtn, this.cornBtn,
this.potatoBtn, this.potatoBtn,
this.walnutBtn this.walnutBtn,
this.leftBtn,
this.rightBtn
].forEach((v) => { ].forEach((v) => {
v.removeEventListener(TouchEvent.TOUCH_TAP, this.onTap, this); v.removeEventListener(TouchEvent.TOUCH_TAP, this.onTap, this);
}); });
...@@ -187,7 +194,18 @@ export default class OptionPanel extends Component { ...@@ -187,7 +194,18 @@ export default class OptionPanel extends Component {
case this.walnutBtn: // 核桃 case this.walnutBtn: // 核桃
petId = CROP_TYPE.WALNUT; petId = CROP_TYPE.WALNUT;
break; break;
case this.leftBtn:
var contentWidth = this.petScroll.viewport.contentWidth;
var toscrollh = this.petScroll.viewport.scrollH - 150;
if(toscrollh<0)toscrollh=0;
this.petScroll.viewport.scrollH = 0;
return;
case this.rightBtn:
var contentWidth = this.petScroll.viewport.contentWidth;
var toscrollh = this.petScroll.viewport.scrollH+150;
if(toscrollh>contentWidth-531)toscrollh=contentWidth-531;
this.petScroll.viewport.scrollH = contentWidth-531;
return;
default: default:
break; break;
} }
......
{ {
"resourcePlugin": { "resourcePlugin": {
"configs": [ "configs": [
{
"configPath": "resource/default.res.json",
"relativePath": "resource/"
},
{ {
"configPath": "resource/default.res.json", "configPath": "resource/default.res.json",
"relativePath": "resource/" "relativePath": "resource/"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment