Remove the extra mobile quick-slot 7 and 8 buttons
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
class TouchController {
|
||||
public:
|
||||
struct ButtonDef {
|
||||
int id; // 1 = attack, 2..7 = skills, 8 = auto hunt, 9..10 = bottom quick slots
|
||||
int id; // 1 = attack, 2..7 = skills, 8 = auto hunt
|
||||
int dik;
|
||||
float x, y, radius;
|
||||
const char* label;
|
||||
@@ -506,14 +506,6 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
if (btn.id >= 9) {
|
||||
const std::string label = std::to_string(quick_slot_index(btn.id) + 1);
|
||||
const float h = r * 0.65f;
|
||||
draw_segment_text(commands, label, btn.x - segment_text_width(label, h) / 2,
|
||||
btn.y - h / 2, h, 0xFFD8C49A);
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (btn.id) {
|
||||
case 1: { // ATK: crossed swords
|
||||
const float s = r * 0.35f;
|
||||
@@ -693,8 +685,8 @@ private:
|
||||
}
|
||||
|
||||
static constexpr int kAutoHuntButton = 8;
|
||||
static bool is_quick_slot_button(int id) { return (id >= 2 && id <= 7) || id == 9 || id == 10; }
|
||||
static int quick_slot_index(int id) { return id >= 9 ? id - 3 : id - 2; }
|
||||
static bool is_quick_slot_button(int id) { return id >= 2 && id <= 7; }
|
||||
static int quick_slot_index(int id) { return id - 2; }
|
||||
|
||||
// Clear "AUTO" vector button; green glow while the hunt runs.
|
||||
static void draw_auto_hunt_button(std::vector<UIRenderCommand>& commands, const ButtonDef& btn) {
|
||||
@@ -770,8 +762,6 @@ private:
|
||||
buttons_.push_back({6, 0x06, 0, 0, 22.0f, "S5", 0x80603090, 0xD08050D0});
|
||||
buttons_.push_back({7, 0x07, 0, 0, 22.0f, "S6", 0x80308090, 0xD050C0D0});
|
||||
buttons_.push_back({kAutoHuntButton, 0, 0, 0, 22.0f, "AUTO", 0x80707070, 0xD0FFFFFF});
|
||||
buttons_.push_back({9, 0x08, 0, 0, 24.0f, "7", 0xB032211B, 0xE0664B2D});
|
||||
buttons_.push_back({10, 0x09, 0, 0, 24.0f, "8", 0xB032211B, 0xE0664B2D});
|
||||
for (auto& btn : buttons_) {
|
||||
if (is_quick_slot_button(btn.id)) {
|
||||
btn.color_idle = 0xA032211B;
|
||||
|
||||
@@ -9,8 +9,8 @@ namespace mt_host {
|
||||
struct TouchCircle { float x, y, radius; };
|
||||
|
||||
struct TouchLayout {
|
||||
// Attack, six skills, auto hunt, two bottom item quick slots.
|
||||
std::array<TouchCircle, 10> buttons;
|
||||
// Attack, six skills and auto hunt.
|
||||
std::array<TouchCircle, 8> buttons;
|
||||
float scale;
|
||||
};
|
||||
|
||||
@@ -33,9 +33,6 @@ inline TouchLayout make_touch_layout(float width, float height, float safe_inset
|
||||
}
|
||||
// Auto hunt button nestled compactly just outside the skill arc.
|
||||
layout.buttons[7] = {ax - 166 * s, ay - 42 * s, 22 * s};
|
||||
const float item_center = std::min(width / 2, layout.buttons[1].x - 114 * s);
|
||||
layout.buttons[8] = {item_center - 36 * s, height - 38 * s, 24 * s};
|
||||
layout.buttons[9] = {item_center + 36 * s, height - 38 * s, 24 * s};
|
||||
return layout;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user