<patch>
    <append xpath="/windows/window[@name='ingameMenu']/grid[@name='buttons']">
        <simplebutton name="btnModMasterOptions" caption_key="dn_ui_master_options_button" depth="3" width="250" height="46" font_size="36" sound="[paging_click]" />
    </append>
	
	<append xpath="/windows/window[@name='ingameMenu']">
    <!-- FIX: Set visible="false" AND set pos="9999,9999".
         If the client lacks the mod, the base controller will force visible=true, 
         BUT it will respect the position, rendering it off-screen. -->
    <rect name="mod_options_panel" depth="5" width="900" height="970" pos="9999, 9999" visible="false" controller="DamageNumbersOptionsController, DamageNumbersMod">
		  <sprite depth="0" name="background" sprite="menu_empty" color="[black]" type="sliced" />

    <!-- === LEFT COLUMN: General Settings & Positioning === -->
    <grid name="left_column_grid" pos="10, -10" width="250" cell_width="250" cell_height="40" arrangement="vertical" cell_spacing="2">
		<label text_key="dn_ui_general_settings_title" style="label" font_size="32" height="30" justify="center" effect="outline"/>
		<rect height="10"/>
		<label text_key="dn_ui_static_hud_options" style="label" font_size="26" height="30" justify="Left" effect="outline" color="255,255,0"/>
			
        <simplebutton name="btnDNShowTest" caption_key="dn_ui_show_test_button" font_size="30" sound="[paging_click]" height="38"/>
        <label text_key="dn_ui_show_test_desc" style="label" font_size="22" height="30"/>
        <rect height="10" />
		
		<label text_key="dn_ui_static_hud_scale" style="label" font_size="26" height="30" color="173,255,47"/>
		<label text_key="dn_ui_hud_scale_desc" style="label" font_size="22" height="30"/>
		<rect height="38">
		    <simplebutton name="btnDecHudScale" caption="- 5%" width="120" height="38" font_size="30" sound="[paging_click]"/>
		    <simplebutton name="btnIncHudScale" caption="+ 5%" width="120" height="38" font_size="30" sound="[paging_click]" pos="130,0"/>
		</rect>
		<label name="lblHudScale" text_key="dn_ui_current_prefix" style="label" font_size="22" height="30" justify="center" effect="outline"/>
    
        <label text_key="dn_ui_hud_position" style="label" font_size="26" height="30" color="173,255,47"/>
		<rect name="horizontalNudge" height="38">
            <simplebutton name="btnNudgeLeft" caption_key="dn_ui_nudge_left" width="120" height="38" font_size="30" sound="[paging_click]"/>
            <simplebutton name="btnNudgeRight" caption_key="dn_ui_nudge_right" width="120" height="38" font_size="30" sound="[paging_click]" pos="130, 0"/>
        </rect>
        <rect name="verticalNudge" height="38">
            <simplebutton name="btnNudgeUp" caption_key="dn_ui_nudge_up" width="120" height="38" font_size="30" sound="[paging_click]"/>
            <simplebutton name="btnNudgeDown" caption_key="dn_ui_nudge_down" width="120" height="38" font_size="30" sound="[paging_click]" pos="130, 0"/>
        </rect>
		
        <label name="lblCurrentPosition" text_key="dn_ui_pos_prefix" style="label" font_size="22" height="30" justify="center" effect="outline"/>
		
        <label text_key="dn_ui_multi_hit_window" style="label" font_size="26" height="30" color="173,255,47"/>
        <label text_key="dn_ui_multi_hit_desc" style="label" font_size="18" height="15"/>
        <rect name="mergeWindowControls" height="32">
            <simplebutton name="btnDecMergeWindow" caption="- 0.1 s" width="120" height="38" font_size="30" sound="[paging_click]"/>
            <simplebutton name="btnIncMergeWindow" caption="+ 0.1 s" width="120" height="38" font_size="30" sound="[paging_click]" pos="130, 0"/>
        </rect>
        <label name="lblMergeWindow" text_key="dn_ui_current_prefix" style="label" font_size="22" height="30" justify="center" effect="outline"/>
        <rect height="10" />
		
		<label text_key="dn_ui_misc_options" style="label" font_size="26" height="30" justify="Left" effect="outline" color="255,255,0"/>
		
        <simplebutton name="btnDNToggleLogging" text_key="dn_ui_verbose_logging_button" font_size="30" sound="[paging_click]" height="38"/>
        <label text_key="dn_ui_verbose_logging_desc" style="label" font_size="20" height="25"/>
        
		<simplebutton name="btnDNRestoreDefaults" caption_key="dn_ui_restore_defaults_button" font_size="30" sound="[paging_click]" height="38"/>
		<label text_key="dn_ui_restore_defaults_desc" style="label" font_size="22" height="30"/>
		
        
        <simplebutton name="btnModOptions_Back" caption_key="xuiBack" font_size="36" sound="[paging_click]" height="42" pos="0, -100"/>
    </grid>

    <!-- === MIDDLE COLUMN: HUD Visibility === -->
    <grid name="middle_column_grid" pos="330, -10" width="250" cell_width="250" cell_height="35" arrangement="vertical" cell_spacing="1">
		    <label text_key="dn_ui_hud_visibility_title" style="label" font_size="32" height="30" justify="center" effect="outline"/>
			<rect height="10" />
            <label text_key="dn_ui_dps_line" style="label" font_size="26" height="30" justify="left" effect="outline" color="173,255,47"/>
            <rect height="38">
                <simplebutton name="btnToggleDpsLabel" caption_key="dn_ui_label" width="120" height="38" font_size="28" sound="[paging_click]"/>
                <simplebutton name="btnToggleDpsValue" caption_key="dn_ui_value" width="120" height="38" font_size="28" sound="[paging_click]" pos="130, 0"/>
            </rect>
            <rect height="38">
                <simplebutton name="btnToggleDpsTimeSpan" caption_key="dn_ui_time_span" width="120" height="38" font_size="28" sound="[paging_click]"/>
            </rect>
			<rect height="5" />
            <label text_key="dn_ui_prev_molo_line" style="label" font_size="26" height="30" justify="left" effect="outline" color="173,255,47"/>
			<rect height="38">
                <simplebutton name="btnToggleMolo2Label" caption_key="dn_ui_label" width="120" height="38" font_size="28" sound="[paging_click]"/>
                <simplebutton name="btnToggleMolo2Total" caption_key="dn_ui_total" width="120" height="38" font_size="28" sound="[paging_click]" pos="130, 0"/>
            </rect>
            <rect height="38">
                <simplebutton name="btnToggleMolo2Breakdown" caption_key="dn_ui_breakdown" width="120" height="38" font_size="26" sound="[paging_click]"/>
                <simplebutton name="btnToggleMolo2Kill" caption_key="dn_ui_kill_icon" width="120" height="38" font_size="28" sound="[paging_click]" pos="130, 0"/>
            </rect>
			<rect height="5" />
            <label text_key="dn_ui_curr_molo_line" style="label" font_size="26" height="30" justify="left" effect="outline" color="173,255,47"/>
			<rect height="38">
                <simplebutton name="btnToggleMolo1Label" caption_key="dn_ui_label" width="120" height="38" font_size="28" sound="[paging_click]"/>
                <simplebutton name="btnToggleMolo1Total" caption_key="dn_ui_total" width="120" height="38" font_size="28" sound="[paging_click]" pos="130, 0"/>
            </rect>
            <rect height="38">
                <simplebutton name="btnToggleMolo1Breakdown" caption_key="dn_ui_breakdown" width="120" height="38" font_size="26" sound="[paging_click]"/>
                <simplebutton name="btnToggleMolo1Kill" caption_key="dn_ui_kill_icon" width="120" height="38" font_size="28" sound="[paging_click]" pos="130, 0"/>
            </rect>
			<rect height="5" />
            <label text_key="dn_ui_robo_line" style="label" font_size="26" height="30" justify="left" effect="outline" color="173,255,47"/>
            <rect height="38">
                <simplebutton name="btnToggleRoboLabel" caption_key="dn_ui_label" width="120" height="38" font_size="28" sound="[paging_click]"/>
                <simplebutton name="btnToggleRoboTotal" caption_key="dn_ui_total" width="120" height="38" font_size="28" sound="[paging_click]" pos="130, 0"/>
            </rect>
            <rect height="38">
                <simplebutton name="btnToggleRoboBreakdown" caption_key="dn_ui_breakdown" width="120" height="38" font_size="26" sound="[paging_click]"/>
                <simplebutton name="btnToggleRoboKill" caption_key="dn_ui_kill_icon" width="120" height="38" font_size="28" sound="[paging_click]" pos="130, 0"/>
            </rect>
			<rect height="5" />
            <label text_key="dn_ui_prev_dmg_line" style="label" font_size="26" height="30" justify="left" effect="outline" color="173,255,47"/>
			<rect height="38">
                <simplebutton name="btnToggleHit2Label" caption_key="dn_ui_label" width="120" height="38" font_size="28" sound="[paging_click]"/>
                <simplebutton name="btnToggleHit2Total" caption_key="dn_ui_total" width="120" height="38" font_size="28" sound="[paging_click]" pos="130, 0"/>
            </rect>
            <rect height="38">
                <simplebutton name="btnToggleHit2Breakdown" caption_key="dn_ui_breakdown" width="120" height="38" font_size="26" sound="[paging_click]"/>
                <simplebutton name="btnToggleHit2Kill" caption_key="dn_ui_kill_icon" width="120" height="38" font_size="28" sound="[paging_click]" pos="130, 0"/>
            </rect>
            <rect height="38">
                 <simplebutton name="btnToggleHit2Victims" caption_key="dn_ui_victims" width="120" height="38" font_size="28" sound="[paging_click]"/>
            </rect>
			<rect height="5" />
            <label text_key="dn_ui_curr_dmg_line" style="label" font_size="26" height="30" justify="left" effect="outline" color="173,255,47"/>
            <rect height="38">
                <simplebutton name="btnToggleHit1Label" caption_key="dn_ui_label" width="120" height="38" font_size="28" sound="[paging_click]"/>
                <simplebutton name="btnToggleHit1Total" caption_key="dn_ui_total" width="120" height="38" font_size="28" sound="[paging_click]" pos="130, 0"/>
            </rect>
            <rect height="38">
                <simplebutton name="btnToggleHit1Breakdown" caption_key="dn_ui_breakdown" width="120" height="38" font_size="26" sound="[paging_click]"/>
                <simplebutton name="btnToggleHit1Kill" caption_key="dn_ui_kill_icon" width="120" height="38" font_size="28" sound="[paging_click]" pos="130, 0"/>
            </rect>
            <rect height="38">
                 <simplebutton name="btnToggleHit1Victims" caption_key="dn_ui_victims" width="120" height="38" font_size="28" sound="[paging_click]"/>
            </rect>
			</grid>

    <!-- === RIGHT COLUMN: Floating Text Options === -->
    <grid name="right_column_grid" pos="650, -10" width="250" cell_width="250" cell_height="40" arrangement="vertical" cell_spacing="2">
        <label text_key="dn_ui_floaty_options_title" style="label" font_size="32" height="30" justify="center" effect="outline"/>
		<rect height="10" />
		<label text_key="dn_ui_floaty_scale" style="label" font_size="26" height="30" color="173,255,47"/>
		<label text_key="dn_ui_floaty_scale_desc" style="label" font_size="18" height="15"/>
        <rect name="floatyScaleControls" height="38">
            <simplebutton name="btnDecFloatyScale" caption="- 5%" width="120" height="38" font_size="30" sound="[paging_click]"/>
            <simplebutton name="btnIncFloatyScale" caption="+ 5%" width="120" height="38" font_size="30" sound="[paging_click]" pos="130, 0"/>
        </rect>
        <label name="lblFloatyScale" text_key="dn_ui_current_prefix" style="label" font_size="22" height="30" justify="center" effect="outline"/>
		
		<rect height="10" />
		
        <label text_key="dn_ui_visibility_types" style="label" font_size="26" height="30" color="173,255,47"/>
		<label text_key="dn_ui_visibility_types_desc" style="label" font_size="18" height="20"/>
        
        <simplebutton name="btnToggleKillSuffix" caption_key="dn_ui_show_kill_suffix" font_size="28" height="38" sound="[paging_click]"/>

        <simplebutton name="btnShowDefault" caption_key="dn_ui_vis_default" font_size="28" height="38" sound="[paging_click]"/>
        <simplebutton name="btnShowBleed" caption_key="dn_ui_vis_bleed" font_size="28" height="38" sound="[paging_click]"/>
        <simplebutton name="btnShowFire" caption_key="dn_ui_vis_fire" font_size="28" height="38" sound="[paging_click]"/>
        <simplebutton name="btnShowRobo" caption_key="dn_ui_vis_robo" font_size="28" height="38" sound="[paging_click]"/>
        <simplebutton name="btnShowExplosive" caption_key="dn_ui_vis_explosive" font_size="28" height="38" sound="[paging_click]"/>
        <rect height="10" />
        
        <label text_key="dn_ui_custom_anims_title" style="label" font_size="26" height="30" color="173,255,47"/>
		<label text_key="dn_ui_custom_anims_desc" style="label" font_size="18" height="20"/>
        <simplebutton name="btnAnimBleed" caption_key="dn_ui_anim_bleed" font_size="28" height="38" sound="[paging_click]"/>
        <simplebutton name="btnAnimFire" caption_key="dn_ui_anim_fire" font_size="28" height="38" sound="[paging_click]"/>
        <simplebutton name="btnAnimRobo" caption_key="dn_ui_anim_robo" font_size="28" height="38" sound="[paging_click]"/>
        <simplebutton name="btnAnimExplosive" caption_key="dn_ui_anim_explosive" font_size="28" height="38" sound="[paging_click]"/>
        <simplebutton name="btnAnimBow" caption_key="dn_ui_anim_bow" font_size="28" height="38" sound="[paging_click]"/>
        <simplebutton name="btnAnimShotgun" caption_key="dn_ui_anim_shotgun" font_size="28" height="38" sound="[paging_click]"/>
        <rect height="20" />
    </grid>
</rect>
</append>
</patch>