size adjustable camera floater

master
Beq 2020-10-12 14:59:31 +01:00
parent 22ac59cb34
commit 456a79ee81
2 changed files with 258 additions and 233 deletions

2
.gitignore vendored
View File

@ -102,3 +102,5 @@ my_autobuild.xml
*.srctrlbm
*.srctrldb
*.srctrlprj
compile_commands.json

View File

@ -1,273 +1,296 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater
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"
can_minimize="false"
can_close="true"
height="165"
layout="topleft"
name="camera_floater"
help_topic="camera_floater"
save_visibility="true"
show_title="false"
single_instance="true"
title="Camera Controls"
chrome="true"
save_rect="true"
width="195">
<floater.string
name="rotate_tooltip">
legacy_header_height="0"
header_height="0"
bg_opaque_image="Window_NoTitle_Foreground"
bg_alpha_image="Window_NoTitle_Foreground"
right="-460"
bottom="-50"
can_dock="false"
can_minimize="false"
can_resize="true"
can_close="false"
chrome="true"
follows="bottom"
height="135"
min_height="135"
layout="topleft"
name="camera_floater"
title="Camera Controls"
help_topic="camera_floater"
save_rect="true"
save_visibility="true"
show_title="false"
single_instance="true"
width="150"
min_width="130">
<floater.string name="rotate_tooltip">
Rotate Camera Around Focus
</floater.string>
<floater.string
name="zoom_tooltip">
</floater.string>
<floater.string name="zoom_tooltip">
Zoom Camera Towards Focus
</floater.string>
<floater.string
name="move_tooltip">
</floater.string>
<floater.string name="move_tooltip">
Move Camera Up and Down, Left and Right
</floater.string>
<floater.string
name="free_mode_title">
</floater.string>
<floater.string name="free_mode_title">
View Object
</floater.string>
<string name="inactive_combo_text">Use preset</string>
<panel
border="false"
follows="top|left"
height="110"
layout="topleft"
left="2"
top_pad="0"
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="190">
<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="2"
name="buttons_panel"
top_pad="0"
width="190">
</floater.string>
<string name="inactive_combo_text">Use preset</string>
<panel
follows="top|left"
height="25"
layout="topleft"
left="2"
name="buttons_panel"
width="120"
top_pad="-5">
<panel_camera_item
name="front_view"
tool_tip="Front View"
width="18"
left="2">
name="front_view"
tool_tip="Front View"
width="18"
left="2">
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
parameter="Front View" />
<panel_camera_item.picture
image_name="Cam_Preset_Front_Off" />
<panel_camera_item.selected_picture
image_name="Cam_Preset_Front_On" />
function="CameraPresets.ChangeView"
parameter="Front View" />
<panel_camera_item.picture image_name="Cam_Preset_Front_Off" />
<panel_camera_item.selected_picture image_name="Cam_Preset_Front_On" />
</panel_camera_item>
<panel_camera_item
name="group_view"
tool_tip="Side View"
width="18"
left_pad="2">
name="group_view"
tool_tip="Side View"
width="18"
left_pad="2">
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
parameter="Side View" />
<panel_camera_item.picture
image_name="Cam_Preset_Side_Off" />
<panel_camera_item.selected_picture
image_name="Cam_Preset_Side_On" />
function="CameraPresets.ChangeView"
parameter="Side View" />
<panel_camera_item.picture image_name="Cam_Preset_Side_Off" />
<panel_camera_item.selected_picture image_name="Cam_Preset_Side_On" />
</panel_camera_item>
<panel_camera_item
name="rear_view"
tool_tip="Rear View"
width="18"
left_pad="2">
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
name="rear_view"
tool_tip="Rear View"
parameter="Rear View" />
<panel_camera_item.picture
image_name="Cam_Preset_Back_Off" />
<panel_camera_item.selected_picture
image_name="Cam_Preset_Back_On" />
width="18"
left_pad="2">
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
tool_tip="Rear View"
parameter="Rear View" />
<panel_camera_item.picture image_name="Cam_Preset_Back_Off" />
<panel_camera_item.selected_picture image_name="Cam_Preset_Back_On" />
</panel_camera_item>
<panel_camera_item
name="object_view"
tool_tip="Object View"
width="18"
left_pad="2">
<panel_camera_item.mousedown_callback
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
parameter="object_view" />
<panel_camera_item.picture
image_name="Object_View_Off" />
<panel_camera_item.selected_picture
image_name="Object_View_On" />
</panel_camera_item>
<panel_camera_item
<panel_camera_item.picture image_name="Object_View_Off" />
<panel_camera_item.selected_picture image_name="Object_View_On" />
</panel_camera_item>
<panel_camera_item
name="mouselook_view"
tool_tip="Mouselook View"
width="18"
left_pad="2">
<panel_camera_item.mousedown_callback
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
parameter="mouselook_view" />
<panel_camera_item.picture
image_name="MouseLook_View_Off" />
<panel_camera_item.selected_picture
image_name="MouseLook_View_On" />
</panel_camera_item>
<panel_camera_item
<panel_camera_item.picture image_name="MouseLook_View_Off" />
<panel_camera_item.selected_picture image_name="MouseLook_View_On" />
</panel_camera_item>
<panel_camera_item
name="reset_view"
tool_tip="Reset view"
width="18"
left_pad="2">
<panel_camera_item.mousedown_callback
<panel_camera_item.mousedown_callback
function="CameraPresets.ChangeView"
parameter="reset_view" />
<panel_camera_item.picture
image_name="StopReload_Off" />
<panel_camera_item.selected_picture
image_name="StopReload_Over" />
</panel_camera_item>
<button
follows="top|left"
height="23"
top_delta="2"
label="Position..."
layout="topleft"
left_pad="5"
name="camera_position_btn"
width="63">
<button.commit_callback
function="Floater.Show"
parameter="prefs_view_advanced"/>
</button>
<panel_camera_item.picture image_name="StopReload_Off" />
<panel_camera_item.selected_picture image_name="StopReload_Over" />
</panel_camera_item>
</panel>
<combo_box
height="23"
mouse_opaque="true"
name="preset_combo"
width="135">
<combo_list
mouse_wheel_opaque="true"/>
<combo_box.item
label="Use preset"
name="Use preset"
value="default" />
</combo_box>
<button
height="23"
width="24"
layout="topleft"
<panel
border="false"
width="140"
class="camera_zoom_panel"
height="60"
layout="topleft"
left="5"
mouse_opaque="false"
name="zoom"
follows="all">
<layout_stack
top="0"
enabled="true"
height="60"
left="0"
mouse_opaque="true"
name="gear_btn"
tool_tip="Camera Presets"
top_delta="0"
left_pad="3"
image_overlay="Icon_Gear"
is_toggle="true">
<button.commit_callback
function="CameraPresets.ShowPresetsList"/>
</button>
<button
follows="top|left"
height="23"
name="camera_view_layout_stack"
orientation="horizontal"
follows="all">
<layout_panel
name="camera_rotate_layout_panel"
user_resize="false"
height="80"
width="80">
<joystick_rotate
follows="all"
height="80"
width="80"
image_selected="Cam_Rotate_In"
image_unselected="Cam_Rotate_Out"
layout="topleft"
left="0"
mouse_opaque="false"
name="cam_rotate_stick"
quadrant="left"
scale_image="true"
sound_flags="3"
visible="true"
tool_tip="Orbit camera around focus"
held_down_delay.seconds="0.0"
top="0" />
</layout_panel>
<layout_panel
name="camera_zoom_layout_panel"
auto_resize="false"
user_resize="false"
height="70"
width="16">
<button
follows="top|left"
height="16"
image_disabled="AddItem_Disabled"
image_selected="AddItem_Press"
image_unselected="AddItem_Off"
layout="topleft"
left_delta="-2"
name="zoom_plus_btn"
scale_image="false"
width="16"
top="0">
<commit_callback function="Zoom.plus" />
<mouse_held_callback function="Zoom.plus" />
</button>
<slider_bar
height="48"
layout="topleft"
name="zoom_slider"
orientation="vertical"
follows="top|left|bottom"
tool_tip="Zoom camera toward focus"
top_delta="13"
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"
name="zoom_minus_btn"
scale_image="true"
top_delta="44"
left_delta="0"
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="80"
width="80">
<joystick_track
follows="all"
height="80"
width="80"
image_selected="Cam_Tracking_In"
image_unselected="Cam_Tracking_Out"
layout="topleft"
left_delta="-2"
name="cam_track_stick"
quadrant="left"
scale_image="true"
sound_flags="3"
tool_tip="Move camera up and down, left and right"
top="0" />
</layout_panel>
</layout_stack>
</panel>
<panel
border="false"
height="50"
layout="topleft"
follows="bottom|left|right"
left="0"
mouse_opaque="false">
<button
follows="bottom|left|right"
height="22"
bottom_delta="23"
label="Position..."
layout="topleft"
left_pad="3"
left_delta="5"
name="camera_position_btn"
width="113">
<button.commit_callback
function="Floater.Show"
parameter="prefs_view_advanced" />
</button>
<button
follows="bottom|right"
height="22"
layout="topleft"
left_pad="3"
name="save_preset_btn"
tool_tip="Save as Preset"
image_overlay="Activate_Checkmark"
image_overlay="Command_Destinations_Icon"
top_delta="0"
width="24">
<button.commit_callback
function="CameraPresets.Save"/>
</button>
width="22">
<button.commit_callback function="CameraPresets.Save" />
</button>
<combo_box
follows="bottom|left|right"
height="22"
left="5"
mouse_opaque="true"
name="preset_combo"
top_pad="0"
width="113">
<combo_list mouse_wheel_opaque="true" />
<combo_box.item
label="Use preset"
name="Use preset"
value="default" />
</combo_box>
<button
follows="bottom|right"
height="22"
width="22"
layout="topleft"
mouse_opaque="true"
name="gear_btn"
tool_tip="Camera Presets"
left_pad="3"
image_overlay="Icon_Gear"
is_toggle="true">
<button.commit_callback function="CameraPresets.ShowPresetsList" />
</button>
</panel>
</floater>