Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the Cursor tracking mode as an option. #173

Merged
merged 8 commits into from
Feb 10, 2025
8 changes: 1 addition & 7 deletions Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,9 @@ namespace {
}
if (line.find("[TRACK_MODE") != string::npos) {
string result = parseStrFromLine("TRACK_MODE", line);
if (result == "CENTER") {
config.track_mode = Config::TRACKING_CENTER;
}
else if (result == "NONE") {
if (result == "NONE") {
config.track_mode = Config::TRACKING_NONE;
}
else if (result == "FOCUS") {
config.track_mode = Config::TRACKING_FOCUS;
}
}
if (line.find("[INVERT_MOUSE_Z") != string::npos) {
string result = parseStrFromLine("INVERT_MOUSE_Z", line);
Expand Down
4 changes: 1 addition & 3 deletions Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ class Config {
enum trackingmode : uint8_t {
TRACKING_NONE,
TRACKING_CENTER,
TRACKING_FOCUS,
TRACKING_INVALID
};

bool closeOnEsc = true;
Expand All @@ -38,7 +36,7 @@ class Config {
int lift_segment = 0;
int animation_step = 196;
bool verbose_logging = false;
trackingmode track_mode = TRACKING_FOCUS;
trackingmode track_mode = TRACKING_CENTER;
bool invert_mouse_z = false;
bool follow_DFcursor = true;
bool show_creature_names = false;
Expand Down
3 changes: 1 addition & 2 deletions GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,7 @@ namespace
auto& ssConfig = stonesenseState.ssConfig;

Crd3D selection = segment->segState.dfSelection;
if ((selection.x != -30000 && ssConfig.config.follow_DFcursor)
|| (ssConfig.config.track_mode == Config::TRACKING_FOCUS)) {
if ((selection.x != -30000 && ssConfig.config.follow_DFcursor)) {
segment->CorrectTileForSegmentOffset(selection.x, selection.y, selection.z);
segment->CorrectTileForSegmentRotation(selection.x, selection.y, selection.z);
}
Expand Down
3 changes: 0 additions & 3 deletions MapLoading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -957,9 +957,6 @@ void read_segment( void *arg)
firstLoad = 0;
if (stonesenseState.ssConfig.config.track_mode == Config::TRACKING_CENTER) {
followCurrentDFCenter();
} else if (stonesenseState.ssConfig.config.track_mode == Config::TRACKING_FOCUS) {
followCurrentDFFocus();
stonesenseState.ssConfig.config.follow_DFcursor = true;
}
stonesenseState.ssConfig.zoom = (df::global::gps->viewport_zoom_factor - 64) / 16;
stonesenseState.ssConfig.recalculateScale();
Expand Down
2 changes: 1 addition & 1 deletion UserInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ void action_cycletrackingmode(uint32_t keymod)
}
else {
ssConfig.config.track_mode = (Config::trackingmode)(ssConfig.config.track_mode + 1);
if (ssConfig.config.track_mode >= Config::TRACKING_INVALID) {
if (ssConfig.config.track_mode > Config::TRACKING_CENTER) {
ssConfig.config.track_mode = Config::TRACKING_NONE;
}
}
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Template for new versions:
- `stonesense`: different types of dig designations (normal, blueprint, autodig) now are distinctly tinted, similar to the vanilla DF interface

## Removed
- `stonesense`: removed the "follow DF cursor" tracking mode

# 51.04-r1.1

Expand Down