1. 更新图片资源
2. 修改 PK/跨房PK 入口
This commit is contained in:
eggmanQQQ
2024-06-13 20:18:03 +08:00
parent d54f70547a
commit ace1bd9bbe
60 changed files with 499 additions and 40 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "room_across_pk_result_red_bg@2x.png",
"filename" : "room_pk_panel_be_mini_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_across_pk_result_red_bg@3x.png",
"filename" : "room_pk_panel_be_mini_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "room_across_pk_result_forceend_red_bg@2x.png",
"filename" : "room_pk_panel_bg_draw@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_across_pk_result_forceend_red_bg@3x.png",
"filename" : "room_pk_panel_bg_draw@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_pk_panel_bg_manager@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_pk_panel_bg_manager@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_pk_panel_bg_normal@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_pk_panel_bg_normal@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_pk_panel_bg_win@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_pk_panel_bg_win@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_pk_panel_blue_mark@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_pk_panel_blue_mark@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_pk_panel_button_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_pk_panel_button_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_pk_panel_mini_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_pk_panel_mini_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_pk_panel_red_mark@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_pk_panel_red_mark@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_pk_panel_result_draw@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_pk_panel_result_draw@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_pk_panel_result_fail@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_pk_panel_result_fail@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_pk_panel_result_win@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_pk_panel_result_win@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_pk_panel_top@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_pk_panel_top@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "crossroom_pk_menu_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "crossroom_pk_menu_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_pk_menu_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_pk_menu_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

View File

@@ -24,7 +24,6 @@ typedef NS_ENUM(NSInteger, ActivityType) {
ActivityType_Love = 1,///寻爱
ActivityType_First = 2,///首充
ActivityType_Fairy = 3,///夺宝精灵
};
@interface ActivityInfoModel : PIBaseModel

View File

@@ -8,10 +8,12 @@
#import <UIKit/UIKit.h>
#import "ActivityInfoModel.h"
#import "LittleGameInfoModel.h"
#import "XPRoomMoreItemModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface MSRoomMenuGameCell : UICollectionViewCell
@property(nonatomic,strong) ActivityInfoModel *model;
@property(nonatomic,strong) XPRoomMoreItemModel *moreItemModel;
@property(nonatomic,strong) LittleGameInfoModel *littleGameModel;
@end

View File

@@ -45,6 +45,11 @@
_textView.text = _model.name;
}
- (void)setMoreItemModel:(XPRoomMoreItemModel *)moreItemModel {
_moreItemModel = moreItemModel;
_gameView.image = [UIImage imageNamed:moreItemModel.imageName];
}
- (void)setLittleGameModel:(LittleGameInfoModel *)littleGameModel{
_littleGameModel = littleGameModel;
_gameView.image = nil;

View File

@@ -11,8 +11,8 @@
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, MSRoomMenuType) {
MSRoomMenuTypeGame,
MSRoomMenuTypeLittleGame,
MSRoomMenuTypeGame, // 玩法
MSRoomMenuTypeLittleGame, // 小游戏
};

View File

@@ -15,7 +15,12 @@
#import "XPRoomViewController.h"
#import "MSRoomGameWebVC.h"
#import "XPRoomAnimationView.h"
#import "XPRoomMoreItemModel.h"
#import "GuildSuperAdminInfoModel.h"
#import "XPRoomPKViewController.h"
#import "XPAcrossRoomPKViewController.h"
#import <NIMSDK/NIMSDK.h>
#import "Api+LittleGame.h"
#import "Api+RoomSetting.h"
@@ -75,7 +80,7 @@
-(void)getGameData{
NSMutableArray *resourceList = [self.hostDelegate getPlayList];
if(resourceList.count > 0){
_gameView.playList = resourceList;
[self updateGamePlayList:resourceList];
return;
}
@@ -85,11 +90,69 @@
if (code == 200) {
@kStrongify(self);
NSArray <ActivityInfoModel *>* array = [ActivityInfoModel modelsWithArray:data.data];
self.gameView.playList = [[NSMutableArray alloc]initWithArray:array];
[self updateGamePlayList:array];
}
} roomId:roomId];
}
- (void)updateGamePlayList:(NSArray *)array {
NSMutableArray *tempArray = [[NSMutableArray alloc] initWithArray:array];
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
NSString * uid = [AccountInfoStorage instance].getUid;
if (uid.length > 0) {
BOOL meIsSuperAdmin = NO;
for (GuildSuperAdminInfoModel *managerInfo in self.hostDelegate.getRoomSuperAdminList) {
if ([managerInfo.uid isEqualToString:[AccountInfoStorage instance].getUid]) {
meIsSuperAdmin = YES;
break;
}
}
NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
request.roomId = roomId;
request.userIds = @[uid];
@kWeakify(self);
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
@kStrongify(self);
if (error == nil) {
NIMChatroomMember * member = members.firstObject;
BOOL isCreator = member.type == NIMChatroomMemberTypeCreator;
BOOL isManager = member.type == NIMChatroomMemberTypeManager;
if (isCreator && roomInfo.type != RoomType_MiniGame) {
if(roomInfo.type != RoomType_Anchor){
[tempArray insertObject:[self createCrossRoomPKModel:roomInfo] atIndex:0];
}
}
if ((isCreator || isManager || meIsSuperAdmin) && roomInfo.type != RoomType_MiniGame && roomInfo.type != RoomType_Anchor) {
[tempArray insertObject:[self createRoomPKModel:roomInfo] atIndex:0];
}
}
self.gameView.playList = tempArray;
}];
}
self.gameView.playList = tempArray;
}
- (XPRoomMoreItemModel *)createRoomPKModel:(RoomInfoModel *)roomInfo {
XPRoomMoreItemModel * roomPK = [[XPRoomMoreItemModel alloc] init];
roomPK.imageName= @"room_pk_menu_icon";
roomPK.type = (roomInfo.roomModeType == RoomModeType_Open_PK_Mode) ?
RoomMoreMenuType_Room_PK_Close :
RoomMoreMenuType_Room_PK_Open;
return roomPK;
}
- (XPRoomMoreItemModel *)createCrossRoomPKModel:(RoomInfoModel *)roomInfo {
XPRoomMoreItemModel * acrossRoomPK = [[XPRoomMoreItemModel alloc] init];
acrossRoomPK.imageName = @"crossroom_pk_menu_icon";
acrossRoomPK.type = (roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode) ?
RoomMoreMenuType_Room_Across_PK_Close :
RoomMoreMenuType_Room_Across_PK_Open;
return acrossRoomPK;
}
- (void)getLittleGameList {
NSMutableArray *resourceList = [self.hostDelegate getLittleGameList];
if(resourceList.count > 0){
@@ -176,8 +239,56 @@
} params:params];
}
-(void)ms_didSelectItemAtIndexPath:(ActivityInfoModel *)model {
self.gameView.hidden = YES;
- (void)handleMoreItem:(XPRoomMoreItemModel *)model {
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
switch (model.type) {
case RoomMoreMenuType_Room_PK_Close: {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click
eventAttributes:@{@"roomMoreMenuType" : @"closeRoomPk"}];
XPRoomPKViewController * roomPKVC = [[XPRoomPKViewController alloc] initWithDelegate:self.hostDelegate];
[self.hostDelegate.getCurrentNav pushViewController:roomPKVC animated:YES];
}
break;
case RoomMoreMenuType_Room_PK_Open: {
if (roomInfo.roomModeType == RoomModeType_Open_Blind) {
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController20")];
} else if (roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode) {
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController21")];
} else {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click
eventAttributes:@{@"roomMoreMenuType" : @"openRoomPk"}];
XPRoomPKViewController * roomPKVC = [[XPRoomPKViewController alloc] initWithDelegate:self.hostDelegate];
[self.hostDelegate.getCurrentNav pushViewController:roomPKVC animated:YES];
}
}
break;
case RoomMoreMenuType_Room_Across_PK_Close: {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"closeAcrossPk"}];
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController15")];
}
break;
case RoomMoreMenuType_Room_Across_PK_Open:{
if (roomInfo.roomModeType == RoomModeType_Open_Blind) {
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController13")];
return;
}
if (roomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
[self showErrorToast:YMLocalizedString(@"XPRoomMoreMenuViewController14")];
return;
}
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_more_tool_click eventAttributes:@{@"roomMoreMenuType" : @"openAcrossPk"}];
XPAcrossRoomPKViewController *acrossRoomPKVC = [[XPAcrossRoomPKViewController alloc] initWithRoomUid:[NSString stringWithFormat:@"%ld", roomInfo.uid]];
[self.hostDelegate.getCurrentNav presentViewController:acrossRoomPKVC animated:YES completion:nil];
}
break;
default:
break;
}
}
- (void)handleActivityInfo:(ActivityInfoModel *)model {
if ([model.code isEqualToString:@"FIND_LOVE"]) {
[self lookLoveTapRecognizer];
} else if([model.code isEqualToString:@"NAUTICAL_ADVENTURE"]) {
@@ -196,7 +307,7 @@
[UIView animateWithDuration:0.2 animations:^{
fairyVC.view.frame = CGRectMake(0, 0, KScreenWidth, KScreenHeight);
}completion:^(BOOL finished) {
}];
}
} else if(model.skipType == ActivitySkipType_Web) {
@@ -208,12 +319,24 @@
[TTPopup popupView:webView style:TTPopupStyleActionSheet];
return;
}
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
webVC.url = model.skipContent;
[self.hostDelegate.getCurrentNav pushViewController:webVC animated:YES];
}
}
-(void)ms_didSelectItemAtIndexPath:(id)model {
self.gameView.hidden = YES;
if ([model isKindOfClass:[XPRoomMoreItemModel class]]) {
// TODO: PK
[self handleMoreItem:(XPRoomMoreItemModel *)model];
} else if ([model isKindOfClass:[ActivityInfoModel class]]) {
[self handleActivityInfo:(ActivityInfoModel *)model];
}
[self dismissViewControllerAnimated:YES completion:nil];
}
-(void)clickGameVC:(ActivityInfoModel *)model{

View File

@@ -14,12 +14,12 @@ NS_ASSUME_NONNULL_BEGIN
-(void)didClickBackBtnAction;
-(void)ms_didSelectLittleGameItemAtIndexPath:(LittleGameInfoModel *)model;
-(void)ms_didSelectItemAtIndexPath:(ActivityInfoModel *)model;
-(void)ms_didSelectItemAtIndexPath:(id)model;
@end
@interface MSRoomMenuGameView : UIView
@property(nonatomic,strong) NSMutableArray<ActivityInfoModel *> *playList;
@property(nonatomic,strong) NSMutableArray *playList; // ActivityInfoModel & XPRoomMoreItemModel
@property(nonatomic,strong) NSMutableArray<LittleGameInfoModel *> *littleGameList;
@property(nonatomic,weak) id<MSRoomMenuGameViewDelegate>delegate;
@end

View File

@@ -51,7 +51,7 @@ static const NSInteger kItemsPerRow = 5;
[self.delegate didClickBackBtnAction];
}
}
-(void)setPlayList:(NSMutableArray<ActivityInfoModel *> *)playList{
-(void)setPlayList:(NSMutableArray *)playList {
_playList = playList;
[self updateViewHeightWithItemCount:playList.count];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
@@ -68,7 +68,6 @@ static const NSInteger kItemsPerRow = 5;
}
- (void)updateViewHeightWithItemCount:(NSInteger)count {
//
NSInteger lineNum = (count + kItemsPerRow - 1)/kItemsPerRow;
CGFloat height = 20 + 56 * lineNum + 44 * (lineNum - 1) + 70;
[self.ms_bgView mas_updateConstraints:^(MASConstraintMaker *make) {
@@ -101,7 +100,12 @@ static const NSInteger kItemsPerRow = 5;
if (_littleGameList.count > 0){
cell.littleGameModel = [self.littleGameList safeObjectAtIndex1:indexPath.row];
} else {
cell.model = [self.playList safeObjectAtIndex1:indexPath.row];
id model = [self.playList safeObjectAtIndex1:indexPath.row];
if ([model isKindOfClass:[XPRoomMoreItemModel class]]) {
cell.moreItemModel = model;
} else if ([model isKindOfClass:[ActivityInfoModel class]]) {
cell.model = model;
}
}
return cell;

View File

@@ -26,12 +26,18 @@
@implementation XPMoreMenuPresenter
- (void)getMoreMenuDataSource:(RoomInfoModel *)roomInfo isSuperAdmin:(BOOL)isSuperAdmin {
XPRoomMoreItemModel * roomPK = [[XPRoomMoreItemModel alloc] init];
roomPK.title = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ?YMLocalizedString(@"XPMoreMenuPresenter26") : YMLocalizedString(@"XPMoreMenuPresenter1");
roomPK.imageName= @"room_more_menu_room_pk";
roomPK.type = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ? RoomMoreMenuType_Room_PK_Close : RoomMoreMenuType_Room_PK_Open;
roomPK.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
// XPRoomMoreItemModel * roomPK = [[XPRoomMoreItemModel alloc] init];
// roomPK.title = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ?YMLocalizedString(@"XPMoreMenuPresenter26") : YMLocalizedString(@"XPMoreMenuPresenter1");
// roomPK.imageName= @"room_pk_menu_icon";
// roomPK.type = roomInfo.roomModeType == RoomModeType_Open_PK_Mode ? RoomMoreMenuType_Room_PK_Close : RoomMoreMenuType_Room_PK_Open;
// roomPK.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
// XPRoomMoreItemModel * acrossRoomPK = [[XPRoomMoreItemModel alloc] init];
// acrossRoomPK.title = roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? YMLocalizedString(@"XPMoreMenuPresenter30") : YMLocalizedString(@"XPMoreMenuPresenter31");
// acrossRoomPK.imageName = @"crossroom_pk_menu_icon";
// acrossRoomPK.type = roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? RoomMoreMenuType_Room_Across_PK_Close : RoomMoreMenuType_Room_Across_PK_Open;
// acrossRoomPK.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
// XPRoomMoreItemModel * giftValue = [[XPRoomMoreItemModel alloc] init];
// giftValue.title = roomInfo.showGiftValue ? YMLocalizedString(@"XPMoreMenuPresenter27") : YMLocalizedString(@"XPMoreMenuPresenter3");
// giftValue.imageName= @"room_more_menu_gift_value";
@@ -55,12 +61,6 @@
dating.imageName = @"room_more_menu_dating";
dating.type = roomInfo.roomModeType == RoomModeType_Open_Blind ? RoomMoreMenuType_Room_Dating_Close : RoomMoreMenuType_Room_Dating_Open;
dating.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
XPRoomMoreItemModel * acrossRoomPK = [[XPRoomMoreItemModel alloc] init];
acrossRoomPK.title = roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? YMLocalizedString(@"XPMoreMenuPresenter30") : YMLocalizedString(@"XPMoreMenuPresenter31");
acrossRoomPK.imageName = @"room_more_menu_cross_pk";
acrossRoomPK.type = roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? RoomMoreMenuType_Room_Across_PK_Close : RoomMoreMenuType_Room_Across_PK_Open;
acrossRoomPK.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
XPRoomMoreItemModel * anchorRoomPK = [[XPRoomMoreItemModel alloc] init];
anchorRoomPK.title = roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode ? YMLocalizedString(@"XPMoreMenuPresenter32") : YMLocalizedString(@"XPMoreMenuPresenter33");
@@ -123,8 +123,6 @@
redPacket.type = RoomMoreMenuType_Room_redPacket;
redPacket.titleColor = [DJDKMIMOMColor roomMoreMenuTextColor];
XPRoomMoreItemModel * report = [[XPRoomMoreItemModel alloc] init];
report.title = YMLocalizedString(@"XPMoreMenuPresenter36");
report.imageName = @"room_info_report";
@@ -152,15 +150,15 @@
NIMChatroomMember * member = members.firstObject;
BOOL isCreator = member.type == NIMChatroomMemberTypeCreator;
BOOL isManager = member.type == NIMChatroomMemberTypeManager;
if ((isCreator || isManager || isSuperAdmin) && roomInfo.type != RoomType_MiniGame && roomInfo.type != RoomType_Anchor) {
[array addObject:roomPK];
}
// if ((isCreator || isManager || isSuperAdmin) && roomInfo.type != RoomType_MiniGame && roomInfo.type != RoomType_Anchor) {
// [array addObject:roomPK];
// }
if (isCreator && roomInfo.type != RoomType_MiniGame) {
if(roomInfo.type != RoomType_Anchor){
[array addObject:acrossRoomPK];
}
}
// if (isCreator && roomInfo.type != RoomType_MiniGame) {
// if(roomInfo.type != RoomType_Anchor){
// [array addObject:acrossRoomPK];
// }
// }
if (isCreator && roomInfo.type == RoomType_Anchor) {
[array addObject:anchorRoomPK];

View File

@@ -0,0 +1,16 @@
//
// XPRoomPKPanelView.h
// YuMi
//
// Created by P on 2024/6/13.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPRoomPKPanelView : UIView
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,20 @@
//
// XPRoomPKPanelView.m
// YuMi
//
// Created by P on 2024/6/13.
//
#import "XPRoomPKPanelView.h"
@implementation XPRoomPKPanelView
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end