小游戏调试完成
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#import "XPSendGiftView.h"
|
||||
#import "XPUserCardViewController.h"
|
||||
#import "XPRoomViewController.h"
|
||||
#import "XPLittleGameMiniStageView.h"
|
||||
@interface XPRoomFunctionContainerView ()<XPAcrpssRoomPKPanelViewDelegate>
|
||||
///host 代理
|
||||
@property (nonatomic,weak) id<RoomHostDelegate>delegate;
|
||||
@@ -63,6 +64,8 @@
|
||||
@property (nonatomic,strong) UIButton *editButton;
|
||||
///跨房pk的面板
|
||||
@property (nonatomic,strong) XPAcrpssRoomPKPanelView *acrossPKPanelView;
|
||||
///小游戏 最小化的坑位
|
||||
@property (nonatomic,strong) XPLittleGameMiniStageView *littleGameMiniView;
|
||||
@end
|
||||
|
||||
@implementation XPRoomFunctionContainerView
|
||||
@@ -83,6 +86,11 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Public Method
|
||||
- (void)hiddenSudGamePostionView {
|
||||
[self.littleGameMiniView hiddenSudGamePostionView];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.contributionButton];
|
||||
@@ -95,7 +103,7 @@
|
||||
- (void)initSubViewConstraints {
|
||||
[self.contributionButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(-12);
|
||||
make.top.mas_equalTo(kNavigationHeight+4);
|
||||
make.top.mas_equalTo(kNavigationHeight);
|
||||
make.width.mas_equalTo(90);
|
||||
make.height.mas_equalTo(26);
|
||||
}];
|
||||
@@ -112,6 +120,23 @@
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)showLittleGameMiniView:(RoomType)type {
|
||||
if (type == RoomType_MiniGame) {
|
||||
if (!self.littleGameMiniView.superview) {
|
||||
[self addSubview:self.littleGameMiniView];
|
||||
[self.littleGameMiniView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(0);
|
||||
make.top.mas_equalTo(kNavigationHeight);
|
||||
make.height.mas_equalTo(23);
|
||||
}];
|
||||
}
|
||||
} else {
|
||||
if (self.littleGameMiniView.superview) {
|
||||
[self.littleGameMiniView removeFromSuperview];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - RoomGuestDelegate
|
||||
- (void)onRoomUpdate {
|
||||
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
|
||||
@@ -201,8 +226,6 @@
|
||||
}
|
||||
} roomUid:roomUid];
|
||||
}
|
||||
|
||||
|
||||
if (roomInfo.type == RoomType_Anchor) {
|
||||
[self.contributionButton setTitle:@"主播榜" forState:UIControlStateNormal];
|
||||
self.anchorGiftValueView.hidden = !roomInfo.showGiftValue;
|
||||
@@ -378,7 +401,6 @@
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPAcrpssRoomPKPanelViewDelegate
|
||||
- (void)xPAcrpssRoomPKPanelView:(XPAcrpssRoomPKPanelView *)view onlookRoom:(NSString *)roomUid {
|
||||
[self.delegate exitRoom];
|
||||
@@ -719,4 +741,13 @@
|
||||
}
|
||||
return _acrossPKPanelView;
|
||||
}
|
||||
|
||||
- (XPLittleGameMiniStageView *)littleGameMiniView {
|
||||
if (!_littleGameMiniView) {
|
||||
_littleGameMiniView = [[XPLittleGameMiniStageView alloc] init];
|
||||
}
|
||||
return _littleGameMiniView;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user