Greater Rift: two Guardians from level 75, overtime status spelled out (#33); item descriptions stay open on touch (#32); Mac: click monsters to attack, items take the mouse, Share Log
The overtime status (#33) was reported with a clear direction by Joe Hu, who also sent a patch along the same lines (#34). Co-authored-by: Joe Hu <12777592+hubeiqiao@users.noreply.github.com>
This commit is contained in:
@@ -75,7 +75,7 @@ void dm_rift_hud_draw(UIView *host, CGRect wr, BOOL hide) {
|
||||
NSString *st = h.done ? (h.inc ? [NSString stringWithFormat:@(dm_ui("dmRiftHudDone")), h.tier] : [NSString stringWithFormat:@(dm_ui("dmRiftHudLate")), h.tier]) : g ? @(dm_ui("dmRiftHudGuard")) : [NSString stringWithFormat:@(dm_ui("dmRiftTierN")), h.tier];
|
||||
set_text(sub, st, d2font(14 * u), white, CGRectMake(48 * u, 9 * u, 130 * u, 19 * u), kCAAlignmentLeft);
|
||||
set_text(timer, [NSString stringWithFormat:@"%d:%02d", s / 60, s % 60], d2font(17 * u), (s <= 60 && !h.done) ? red : gold, CGRectMake(W - 90 * u, 6 * u, 80 * u, 22 * u), kCAAlignmentRight);
|
||||
NSString *gl = h.done ? (!h.inc ? @(dm_ui("dmRiftHudSame")) : h.next > h.tier ? [NSString stringWithFormat:@(dm_ui("dmRiftHudNext")), h.next] : @(dm_ui("dmRiftHudTop"))) : g ? @(dm_ui("dmRiftHudKill")) : [NSString stringWithFormat:@(dm_ui("dmRiftHudGoal")), (int)(h.progress * 100)];
|
||||
NSString *gl = h.done ? (!h.inc ? @(dm_ui("dmRiftHudSame")) : h.next > h.tier ? [NSString stringWithFormat:@(dm_ui("dmRiftHudNext")), h.next] : @(dm_ui("dmRiftHudTop"))) : h.overtime ? @(dm_ui("dmRiftHudOver")) : g ? @(dm_ui("dmRiftHudKill")) : [NSString stringWithFormat:@(dm_ui("dmRiftHudGoal")), (int)(h.progress * 100)]; // 已超时:第二行换成这一句,优先于「击败守护者」/ 进度目标(第一行照旧写第几层 / 守护者现身) | overtime: the second line becomes this sentence, taking priority over "Slay the Rift Guardian" / the progress goal (the first line still says which level / that the Guardian has appeared)
|
||||
set_text(goal, gl, d2font(12 * u), grey, CGRectMake(10 * u, 32 * u, W - 20 * u, 17 * u), kCAAlignmentLeft);
|
||||
CGRect tr = CGRectMake(11 * u, 55 * u, W - 22 * u, 10 * u); // 含 1 单位外框(条 8 + 外框各 1) // 进度条:外框暗边 + 深底,填充金褐(守护者转暗红),每 10% 一道刻痕,两端菱形钉 | Includes the 1-unit outer frame (bar 8 + frame 1 on each side) // Progress bar: dark-edged outer frame + deep background, golden-brown fill (turns dark red for the guardian), a notch every 10%, diamond studs at both ends
|
||||
track.frame = tr; track.backgroundColor = rgb(25, 20, 14, 1).CGColor; track.borderColor = rgb(95, 78, 48, 1).CGColor; track.borderWidth = MAX(1, u);
|
||||
|
||||
@@ -609,6 +609,7 @@ static BOOL touch_done(UITouch *t) { UITouchPhase ph=t.phase; return ph==UITouch
|
||||
if(_controls.navigation_mode && _controls.pointer_slot==i && _itemAsked) { _itemAsked=NO; dm_tc_pointer_item(&_controls,dm_ui_item_result(_itemSeq)); [self bindTapSync]; } // 松手时还没告诉过:现在取(没答上 = 按别处处理) | Not yet told at release: fetch now (no answer = handle as elsewhere)
|
||||
unsigned wt=_controls.world_tap_seq;
|
||||
unsigned mc=_controls.mouse_click_seq; unsigned tt=_controls.tab_tap_seq; unsigned us=_controls.use_seq; unsigned ids=_controls.ident_seq; unsigned sts=_controls.stack_take_seq; unsigned lps=_controls.long_press_seq; unsigned its=_controls.item_tap_seq;
|
||||
BOOL dragged=_uiDragOn && _controls.pointer_slot==i;
|
||||
if(_uiDragOn && _controls.pointer_slot==i) { _uiDragOn=NO; dm_ui_drag_end(); }
|
||||
BOOL wasPtr=_controls.pointer_slot==i; unsigned tm=_controls.tap_move_seq;
|
||||
// 按下 / 移动 / 抬起都取事件这一刻的时间(同 tick 的时钟):面板开着时显示节拍降到 2 次 / 秒,原先取「上一拍的时刻」,0.12 秒的点按会被量成 0.5 秒、不算点按(点页签不切)
|
||||
@@ -627,7 +628,12 @@ static BOOL touch_done(UITouch *t) { UITouchPhase ph=t.phase; return ph==UITouch
|
||||
if(_controls.ident_seq!=ids) dm_ui_identify_hovered(); // 物品区双击未鉴定物品 = 免费鉴定(宿主走游戏自己的鉴定函数) | Double tap on an unidentified item in the item area = free identify (the host calls the game's own identify function)
|
||||
if(_controls.use_seq!=us) dm_ui_use_item(); // 物品区双击 = 使用 / 购买 / 装备(宿主按光标下物品走原生入口) | Double tap in the item area = use / buy / equip (the host goes through the native entry for the item under the cursor)
|
||||
if(_controls.world_tap_seq!=wt && self.bounds.size.width>0) { float wx,wy; world_norm(self,_controls.world_tap_x,_controls.world_tap_y,&wx,&wy); dm_ui_world_tap((float)(_controls.world_tap_x/self.bounds.size.width),(float)(_controls.world_tap_y/self.bounds.size.height),wx,wy); } // 游戏态点世界:点目标 = 交互,点空地不发令 | World tap in game mode: tapping a target = interact; tapping empty ground issues no command
|
||||
if(wasPtr && _controls.navigation_mode) _tipUntil=_controls.tap_move_seq!=tm ? -1 : _controls.last_time_s+(_controls.mouse_click_seq!=mc ? 0.05 : 2.8); // 点的是技能图标 / 属性「+」(选中待确认):光标留在上面,原版高亮和说明框一直在,点别处 / 点另一个 / 关面板才收 // 说明框:松手后 2.8 秒自己收(游戏的说明框要点后约 0.8 秒才出来,实测;留约 2 秒看);点的是空处 / 普通按钮 = 立即收 | Tapped a skill icon / stat "+" (selected, awaiting confirmation): the cursor stays on it and the original game's highlight and tooltip stay until tapping elsewhere / tapping another / closing the panel // Tooltip: closes by itself 2.8 seconds after release (the game's tooltip takes about 0.8 seconds after the tap to appear, measured; leaving about 2 seconds to read); tapped empty space / an ordinary button = close immediately
|
||||
// 单纯点了一件物品(没拖、没触发使用 / 鉴定 / 取一件 / 长按):光标留在它上面,说明框一直在,点别处 / 点另一件 / 关面板才收——同下面的技能图标。
|
||||
// 原先一律松手后 2.8 秒收,玩家读长说明读到一半框没了、要再点一次。拖放、使用之后光标停在落点上的那种仍按 2.8 秒收(不然放完东西说明框一直盖着)
|
||||
// A plain tap on an item (no drag, no use / identify / take-one / long press triggered): the cursor stays on it and the description stays up until a tap elsewhere / on another item / the panel closes - same as the skill icons below.
|
||||
// It used to be put away 2.8 seconds after release in every case, so a player reading a long description lost it halfway and had to tap again. When the cursor rests on the drop point after a drag or a use, it is still put away after 2.8 seconds (otherwise the description would keep covering things after an item is placed)
|
||||
BOOL itemTap=_controls.item_tap_seq!=its && !dragged && _controls.use_seq==us && _controls.ident_seq==ids && _controls.stack_take_seq==sts && _controls.long_press_seq==lps && _controls.mouse_click_seq==mc;
|
||||
if(wasPtr && _controls.navigation_mode) _tipUntil=(_controls.tap_move_seq!=tm || itemTap) ? -1 : _controls.last_time_s+(_controls.mouse_click_seq!=mc ? 0.05 : 2.8); // 点的是技能图标 / 属性「+」(选中待确认):光标留在上面,原版高亮和说明框一直在,点别处 / 点另一个 / 关面板才收 // 说明框:松手后 2.8 秒自己收(游戏的说明框要点后约 0.8 秒才出来,实测;留约 2 秒看);点的是空处 / 普通按钮 = 立即收 | Tapped a skill icon / stat "+" (selected, awaiting confirmation): the cursor stays on it and the original game's highlight and tooltip stay until tapping elsewhere / tapping another / closing the panel // Tooltip: closes by itself 2.8 seconds after release (the game's tooltip takes about 0.8 seconds after the tap to appear, measured; leaving about 2 seconds to read); tapped empty space / an ordinary button = close immediately
|
||||
if(_controls.mouse_click_seq!=mc && self.bounds.size.width>0) { float nx=_controls.mouse_click_x/self.bounds.size.width, ny=_controls.mouse_click_y/self.bounds.size.height; dm_ui_touch(0,nx,ny); dm_ui_touch(2,nx,ny); } // 非物品区点按 = 界面鼠标点击 | Tap outside the item area = UI mouse click
|
||||
break; }
|
||||
[self recordTouch:t slot:slot phase:phase];
|
||||
|
||||
Reference in New Issue
Block a user