public override bool DrawSpecial(Rect rect, WidgetRow row) => false; //Too big for one line public override bool DrawMore(Listing_StandardIndent listing) { if (Sel.stages.Count <= 1) { return(false); } //Buttons apparently are too tall for the line height? listing.Gap(listing.verticalSpacing); Rect nextRect = listing.GetRect(Text.LineHeight); WidgetRow row = new WidgetRow(nextRect.x, nextRect.y); //Actually Range from 1 to 2 is fine cause it can match both //if(sel.stages.Count == 2) // DoStageDropdown(row, stageRange.min, i => { stageRange.min = i; stageRange.max = i; }); //else { row.Label("TD.From".Translate()); DoStageDropdown(row, stageRange.min, i => stageRange.min = i); row.Label("RangeTo".Translate()); DoStageDropdown(row, stageRange.max, i => stageRange.max = i); } return(false); }
public override bool DrawMore(Listing_StandardIndent listing) { listing.Gap(); listing.NestedIndent(Listing_Standard.DefaultIndent); //Draw filters bool changed = MainTabWindow_List.DoFilters(listing, filters); if (!owner.locked) { MainTabWindow_List.DrawAddRow(listing, owner, filters); } listing.NestedOutdent(); return(changed); }
public static void DrawAddRow(Listing_StandardIndent listing, FindDescription owner, List <ListFilter> filters = null) { Rect addRow = listing.GetRect(Text.LineHeight); listing.Gap(listing.verticalSpacing); Rect butRect = addRow; butRect.width = Text.LineHeight; Widgets.DrawTextureFitted(butRect, TexButton.Plus, 1.0f); Rect textRect = addRow; textRect.xMin += Text.LineHeight + WidgetRow.DefaultGap; Widgets.Label(textRect, "TD.AddNewFilter...".Translate()); Widgets.DrawHighlightIfMouseover(addRow); if (Widgets.ButtonInvisible(addRow)) { AddFilterFloat(owner, filters); } }