mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-04-23 08:14:31 +00:00
Fix Notes Conditions (#5847)
* Fix conditions for personal notes being displayed and the notes display type option being disabled. * clang
This commit is contained in:
parent
56ab4c51fd
commit
c0aa3deb93
|
|
@ -1595,10 +1595,7 @@ void ItemTrackerWindow::DrawElement() {
|
|||
DrawItemsInRows(mainWindowItems, 6);
|
||||
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Notes"), SECTION_DISPLAY_HIDDEN) ==
|
||||
SECTION_DISPLAY_MAIN_WINDOW &&
|
||||
(CVarGetInteger(CVAR_TRACKER_ITEM("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING &&
|
||||
CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) ==
|
||||
TRACKER_DISPLAY_ALWAYS)) {
|
||||
SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
DrawNotes();
|
||||
}
|
||||
EndFloatingWindows();
|
||||
|
|
@ -2104,10 +2101,9 @@ void RegisterItemTrackerWidgets() {
|
|||
.Color(THEME_COLOR)
|
||||
.ComboMap(displayTypes))
|
||||
.PreFunc([&](WidgetInfo& info) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_WINDOW ||
|
||||
(CVarGetInteger(CVAR_TRACKER_ITEM("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING &&
|
||||
CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) !=
|
||||
TRACKER_DISPLAY_COMBO_BUTTON)) {
|
||||
if (CVarGetInteger(CVAR_TRACKER_ITEM("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING &&
|
||||
CVarGetInteger(CVAR_TRACKER_ITEM("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) ==
|
||||
TRACKER_DISPLAY_COMBO_BUTTON) {
|
||||
info.options.get()->disabled = true;
|
||||
info.options.get()->disabledTooltip = notesDisabledTooltip;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue