@@ -163,19 +163,24 @@ private void DrawSelectTugs(string hook, ref bool enabled, ref HookType type, re
163163 }
164164
165165 ImGui . Spacing ( ) ;
166-
167- if ( DrawUtil . Checkbox ( UIStrings . OnlyUseWhenActiveSurfaceSlap , ref hookOnlyWhenActiveSlap ) )
166+
167+ if ( ImGui . TreeNodeEx ( UIStrings . Surface_Slap_Options , ImGuiTreeNodeFlags . FramePadding ) )
168168 {
169- hookOnlyWhenNOTActiveSlap = false ;
170- Service . Save ( ) ;
171- }
169+ if ( DrawUtil . Checkbox ( UIStrings . OnlyUseWhenActiveSurfaceSlap , ref hookOnlyWhenActiveSlap ) )
170+ {
171+ hookOnlyWhenNOTActiveSlap = false ;
172+ Service . Save ( ) ;
173+ }
172174
173- if ( DrawUtil . Checkbox ( UIStrings . OnlyUseWhenNOTActiveSurfaceSlap , ref hookOnlyWhenNOTActiveSlap ) )
174- {
175- hookOnlyWhenActiveSlap = false ;
176- Service . Save ( ) ;
175+ if ( DrawUtil . Checkbox ( UIStrings . OnlyUseWhenNOTActiveSurfaceSlap , ref hookOnlyWhenNOTActiveSlap ) )
176+ {
177+ hookOnlyWhenActiveSlap = false ;
178+ Service . Save ( ) ;
179+ }
180+
181+ ImGui . TreePop ( ) ;
177182 }
178-
183+
179184 ImGui . TreePop ( ) ;
180185 }
181186
@@ -238,65 +243,52 @@ private void DrawInputDoubleMinTime(HookConfig hookConfig)
238243
239244 private void DrawChumMinMaxTime ( HookConfig hookConfig )
240245 {
241- if ( ImGui . Button ( UIStrings . ChumTimer ) )
242- {
243- ImGui . OpenPopup ( str_id : "chum_timer" ) ;
244- }
245-
246- if ( ImGui . BeginPopup ( "chum_timer" ) )
247- {
248- ImGui . Spacing ( ) ;
249- if ( DrawUtil . Checkbox ( UIStrings . EnableChumTimers , ref hookConfig . UseChumTimer ,
250- UIStrings . EnableChumTimersHelpMarker ) )
246+ DrawUtil . DrawCheckboxTree ( UIStrings . EnableChumTimers , ref hookConfig . UseChumTimer ,
247+ ( ) =>
251248 {
252- Service . Save ( ) ;
253- }
254-
255- ImGui . Separator ( ) ;
256-
257- ImGui . SetNextItemWidth ( 100 * ImGuiHelpers . GlobalScale ) ;
258- if ( ImGui . InputDouble ( UIStrings . MinWait , ref hookConfig . MinChumTimeDelay , .1 , 1 , "%.1f%" ) )
259- {
260- switch ( hookConfig . MinChumTimeDelay )
249+ ImGui . SetNextItemWidth ( 100 * ImGuiHelpers . GlobalScale ) ;
250+ if ( ImGui . InputDouble ( UIStrings . MinWait , ref hookConfig . MinChumTimeDelay , .1 , 1 , "%.1f%" ) )
261251 {
262- case <= 0 :
263- hookConfig . MinChumTimeDelay = 0 ;
264- break ;
265- case > 99 :
266- hookConfig . MinChumTimeDelay = 99 ;
267- break ;
252+ switch ( hookConfig . MinChumTimeDelay )
253+ {
254+ case <= 0 :
255+ hookConfig . MinChumTimeDelay = 0 ;
256+ break ;
257+ case > 99 :
258+ hookConfig . MinChumTimeDelay = 99 ;
259+ break ;
260+ }
261+ Service . Save ( ) ;
268262 }
269- Service . Save ( ) ;
270- }
271263
272- ImGui . SameLine ( ) ;
273- ImGuiComponents . HelpMarker ( UIStrings . HelpMarkerMinWaitTimer ) ;
264+ ImGui . SameLine ( ) ;
265+ ImGuiComponents . HelpMarker ( UIStrings . HelpMarkerMinWaitTimer ) ;
274266
275- ImGui . SetNextItemWidth ( 100 * ImGuiHelpers . GlobalScale ) ;
276- if ( ImGui . InputDouble ( UIStrings . MaxWait , ref hookConfig . MaxChumTimeDelay , .1 , 1 , "%.1f%" ) )
277- {
278- switch ( hookConfig . MaxChumTimeDelay )
267+ ImGui . SetNextItemWidth ( 100 * ImGuiHelpers . GlobalScale ) ;
268+ if ( ImGui . InputDouble ( UIStrings . MaxWait , ref hookConfig . MaxChumTimeDelay , .1 , 1 , "%.1f%" ) )
279269 {
280- case 0.1 :
281- hookConfig . MaxChumTimeDelay = 2 ;
282- break ;
283- case <= 0 :
284- case <= 1.9 : //This makes the option turn off if delay = 2 seconds when clicking the minus.
285- hookConfig . MaxChumTimeDelay = 0 ;
286- break ;
287- case > 99 :
288- hookConfig . MaxChumTimeDelay = 99 ;
289- break ;
270+ switch ( hookConfig . MaxChumTimeDelay )
271+ {
272+ case 0.1 :
273+ hookConfig . MaxChumTimeDelay = 2 ;
274+ break ;
275+ case <= 0 :
276+ case <= 1.9 : //This makes the option turn off if delay = 2 seconds when clicking the minus.
277+ hookConfig . MaxChumTimeDelay = 0 ;
278+ break ;
279+ case > 99 :
280+ hookConfig . MaxChumTimeDelay = 99 ;
281+ break ;
282+ }
283+ Service . Save ( ) ;
290284 }
291- Service . Save ( ) ;
292- }
293-
294- ImGui . SameLine ( ) ;
295285
296- ImGuiComponents . HelpMarker ( UIStrings . HelpMarkerMaxWaitTimer ) ;
286+ ImGui . SameLine ( ) ;
297287
298- ImGui . EndPopup ( ) ;
299- }
288+ ImGuiComponents . HelpMarker ( UIStrings . HelpMarkerMaxWaitTimer ) ;
289+ }
290+ , UIStrings . EnableChumTimersHelpMarker ) ;
291+
300292 }
301293
302294 private void DrawEnabledButtonCustomBait ( HookConfig hookConfig )
0 commit comments