Make camera controls less bulky

Not the prettiest of solutions but does keep the size down
meow-7.2.2
Beq 2020-07-18 02:04:01 +01:00
parent c3fc5d8b3c
commit de9b0ef478
2 changed files with 165 additions and 146 deletions

View File

@ -1,16 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
header_height="0"
legacy_header_height="0"
header_height="0"
bg_opaque_image="Window_NoTitle_Foreground"
bg_alpha_image="Window_NoTitle_Foreground"
positioning="specified"
right="-460"
bottom="-50"
follows="left|bottom"
legacy_header_height="0"
can_minimize="false"
can_resize="true"
can_close="false"
height="85"
height="120"
min_height="120"
layout="topleft"
name="camera_floater"
help_topic="camera_floater"
@ -20,7 +22,8 @@
title="Camera Controls"
chrome="true"
save_rect="true"
width="340">
width="168"
min_width="168">
<floater.string
name="rotate_tooltip">
Rotate Camera Around Focus
@ -39,105 +42,12 @@
</floater.string>
<string name="inactive_combo_text">Use preset</string>
<panel
border="false"
top_pad="-5"
follows="top|left"
height="123"
height="22"
layout="topleft"
left="2"
top_pad="-23"
mouse_opaque="false"
name="controls"
width="190">
<!--TODO: replace + - images -->
<panel
border="false"
class="camera_zoom_panel"
bottom="-1"
layout="topleft"
left="0"
mouse_opaque="false"
name="zoom"
top="0"
width="220">
<joystick_rotate
follows="top|left"
height="78"
layout="topleft"
left="2"
name="cam_rotate_stick"
quadrant="left"
sound_flags="3"
visible="true"
tool_tip="Orbit camera around focus"
top="25"
width="78" />
<button
follows="top|left"
height="18"
image_disabled="AddItem_Disabled"
image_selected="AddItem_Press"
image_unselected="AddItem_Off"
layout="topleft"
left_pad="4"
name="zoom_plus_btn"
width="18"
top="23">
<commit_callback
function="Zoom.plus" />
<mouse_held_callback
function="Zoom.plus" />
</button>
<slider_bar
height="50"
layout="topleft"
name="zoom_slider"
orientation="vertical"
tool_tip="Zoom camera toward focus"
top_pad="0"
min_val="0"
max_val="1"
width="18">
<commit_callback function="Slider.value_changed"/>
</slider_bar>
<button
follows="top|left"
height="18"
image_disabled="MinusItem_Disabled"
image_selected="MinusItem_Press"
image_unselected="MinusItem_Off"
layout="topleft"
name="zoom_minus_btn"
top_pad="0"
width="18">
<commit_callback
function="Zoom.minus" />
<mouse_held_callback
function="Zoom.minus" />
</button>
<joystick_track
follows="top|left"
height="78"
image_selected="Cam_Tracking_In"
image_unselected="Cam_Tracking_Out"
layout="topleft"
left_pad="4"
name="cam_track_stick"
quadrant="left"
scale_image="false"
sound_flags="3"
tool_tip="Move camera up and down, left and right"
top="25"
width="78"/>
</panel>
</panel>
<panel
follows="all"
height="27"
layout="topleft"
left_pad="2"
name="buttons_panel"
top_delta="18"
width="120">
name="buttons_panel">
<panel_camera_item
name="front_view"
tool_tip="Front View"
@ -154,7 +64,7 @@
name="group_view"
tool_tip="Side View"
width="18"
left_pad="2">
left_pad="4">
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
parameter="Side View" />
@ -167,7 +77,7 @@
name="rear_view"
tool_tip="Rear View"
width="18"
left_pad="2">
left_pad="4">
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
tool_tip="Rear View"
@ -181,7 +91,7 @@
name="object_view"
tool_tip="Object View"
width="18"
left_pad="2">
left_pad="4">
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
parameter="object_view" />
@ -194,7 +104,7 @@
name="mouselook_view"
tool_tip="Mouselook View"
width="18"
left_pad="2">
left_pad="4">
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
parameter="mouselook_view" />
@ -207,7 +117,7 @@
name="reset_view"
tool_tip="Reset view"
width="18"
left_pad="2">
left_pad="4">
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
parameter="reset_view" />
@ -216,29 +126,15 @@
<panel_camera_item.selected_picture
image_name="StopReload_Over" />
</panel_camera_item>
</panel>
<combo_box
height="23"
left_delta="-1"
mouse_opaque="true"
name="preset_combo"
top_pad="7"
width="122">
<combo_list
mouse_wheel_opaque="true"/>
<combo_box.item
label="Use preset"
name="Use preset"
value="default" />
</combo_box>
<button
height="16"
width="16"
layout="topleft"
follows="bottom|right"
mouse_opaque="true"
name="gear_btn"
tool_tip="Camera Presets"
top_delta="3"
top_delta="7"
left_pad="3"
image_selected="Icon_Gear"
image_pressed="Icon_Gear"
@ -247,31 +143,154 @@
<button.commit_callback
function="CameraPresets.ShowPresetsList"/>
</button>
<!--
</panel>
<panel
border="false"
class="camera_zoom_panel"
layout="topleft"
height="50"
left="0"
mouse_opaque="false"
name="zoom"
top="5"
follows="all"
width="150">
<layout_stack
top_pad="20"
enabled="true"
height="65"
left="8"
mouse_opaque="true"
name="camera_view_layout_stack"
orientation="horizontal"
width="150"
follows="all">
<layout_panel
name="camera_rotate_layout_panel"
user_resize="false"
height="100"
width="100">
<joystick_rotate
follows="all"
height="100"
width="100"
layout="topleft"
left="0"
name="cam_rotate_stick"
quadrant="left"
sound_flags="3"
visible="true"
tool_tip="Orbit camera around focus"
top="0" />
</layout_panel>
<layout_panel
name="camera_zoom_layout_panel"
auto_resize="false"
user_resize="false"
height="100"
width="16"
left_pad="5">
<button
follows="top|left"
height="16"
image_disabled="AddItem_Disabled"
image_selected="AddItem_Press"
image_unselected="AddItem_Off"
left_delta="0"
name="zoom_plus_btn"
width="16"
top_pad="-5">
<commit_callback
function="Zoom.plus" />
<mouse_held_callback
function="Zoom.plus" />
</button>
<slider_bar
height="76"
layout="topleft"
name="zoom_slider"
orientation="vertical"
follows="top|left|bottom"
tool_tip="Zoom camera toward focus"
top_delta="16"
left_delta="1"
min_val="0"
max_val="1"
width="16">
<commit_callback function="Slider.value_changed"/>
</slider_bar>
<button
follows="bottom|left"
height="16"
image_disabled="MinusItem_Disabled"
image_selected="MinusItem_Press"
image_unselected="MinusItem_Off"
layout="topleft"
top_pad="0"
name="zoom_minus_btn"
width="16">
<commit_callback
function="Zoom.minus" />
<mouse_held_callback
function="Zoom.minus" />
</button>
</layout_panel>
<layout_panel
name="panel_track"
user_resize="false"
height="100"
width="100">
<joystick_track
follows="all"
height="100"
image_selected="Cam_Tracking_In"
image_unselected="Cam_Tracking_Out"
layout="topleft"
name="cam_track_stick"
quadrant="left"
scale_image="true"
sound_flags="3"
tool_tip="Move camera up and down, left and right"
top="0"
width="100"/>
</layout_panel>
</layout_stack>
</panel>
<panel
follows="left|right|bottom"
height="30"
layout="topleft"
left="2"
name="camera_preset_control_panel"
top="95"
width="165">
<button
follows="top|left"
height="23"
label="Save as preset..."
follows="left|bottom"
height="20"
top="0"
label="Position"
layout="topleft"
left="0"
name="save_preset_btn"
top_pad="7"
width="143">
<button.commit_callback
function="CameraPresets.Save"/>
</button>
-->
<button
follows="top|left"
height="23"
label="Camera Position..."
layout="topleft"
left_delta="-125"
left_delta="0"
name="camera_position_btn"
top_pad="9"
width="143">
width="53">
<button.commit_callback
function="Floater.Show"
parameter="prefs_view_advanced"/>
</button>
<combo_box
height="20"
top_delta="0"
left_pad="3"
follows="right|bottom"
mouse_opaque="true"
name="preset_combo"
width="105">
<combo_list
mouse_wheel_opaque="true"/>
<combo_box.item
label="Use preset"
name="Use preset"
value="default" />
</combo_box>
</panel>
</floater>

View File

@ -2,22 +2,22 @@
<floater
legacy_header_height="18"
can_resize="true"
height="200"
height="150"
min_height="150"
title="Camera Presets"
layout="topleft"
name="floater_camera_presets"
single_instance="true"
min_width="185"
width="250">
min_width="100"
width="180">
<flat_list_view
allow_select="true"
follows="all"
height="165"
height="145"
layout="topleft"
left="3"
multi_select="false"
name="preset_list"
top="20"
width="245" />
width="175" />
</floater>