Skip to content

Commit

Permalink
Minor clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mchorse committed Nov 25, 2021
1 parent dc37e60 commit eaebf4d
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 95 deletions.
2 changes: 2 additions & 0 deletions help/en_US/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ aperture.config:
overlay_rl: Overlay path
f1_tooltip: F1 hide tooltip
position: Display position
guides_color: Guides color
rule_of_thirds: Rule of thirds
center_lines: Center lines
crosshair: Crosshair
letter_box: Letter box
aspect_ratio: Aspect ratio
Expand Down
2 changes: 2 additions & 0 deletions help/en_US/config_comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ aperture.config.comments:
overlay_rl: Resource location path to the texture which will be used as overlay
f1_tooltip: Show the tooltip in the bottom left corner which explains how to show back the GUI
position: Show camera properties when sync mode enabled
guides_color: Color that will be used for rule of thirds and center lines (including transparency)
rule_of_thirds: Show rule of thirds guides
center_lines: Center lines
crosshair: Show a crosshair in the middle of the camera editor's screen
letter_box: Show letter box (aka black bars) which narrow or widen the camera shot as a reference
aspect_ratio: Aspect ratio for camera editor's letterbox feature
Expand Down
18 changes: 0 additions & 18 deletions help/en_US/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,6 @@ aperture.gui:
config:
title: Camera Options

outside: Outside mode
spectator: Spectator
show_path: Show path
sync: Sync
flight: Flight mode
flight_tooltip: Enables flight mode, which allows to control the camera within camera editor with WASD and mouse dragging (see Aperture's flight mode configuration for keybinds)
display_info: Display position
minecrafttp_teleport: Use /minecraft:tp
tp_teleport: Use /tp
guides_color: Guides color
rule_of_thirds: Rule of thirds
center_lines: Center lines
crosshair: Crosshair
letter_box: Letter box
repeat: Repeat fixture
overlay: Enable overlay
pick_overlay: Pick overlay

tooltips:
jump_next_fixture: Jump to next fixture
jump_next_frame: Jump to next frame
Expand Down
15 changes: 0 additions & 15 deletions help/pt_BR/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,6 @@ aperture.gui:
config:
title: Opções de Câmera

outside: Modo externo (O)
minema: Minema
spectator: Espectador
show_path: Mostrar caminho
sync: Sincronizar (S)
flight: Modo de Voo (F)
display_info: Mostrar posição
minecrafttp_teleport: Usar /minecraft:tp
tp_teleport: Usar /tp
rule_of_thirds: Regra dos terços
letter_box: Caixa de correio
repeat: Repetir acessório (R)
overlay: Habilitar sobreposição
pick_overlay: Escolher sobreposição

tooltips:
jump_next_fixture: Ir para o próximo acessório (Shift + Seta Direita)
jump_next_frame: Ir para o próximo frame (Seta Direita)
Expand Down
2 changes: 2 additions & 0 deletions help/ru_RU/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ aperture.config:
overlay_rl: Путь оверлэя
f1_tooltip: Спрятать подсказку на F1
position: Отображать позицию
guides_color: Цвет направляющих
rule_of_thirds: Правило третей
center_lines: Центр экрана
crosshair: Перекрестие
letter_box: Каше
aspect_ratio: Соотношение сторон
Expand Down
2 changes: 2 additions & 0 deletions help/ru_RU/config_comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ aperture.config.comments:
overlay_rl: Путь к текстуре, которая будет использована в качестве оверлэя
f1_tooltip: Показывать подсказку в левом нижнем углу которая объясняет как включить интерфейс обратно
position: Показывать свойства камеры при включённом режиме синхронизации
guides_color: Выбрать цвет рамок правила третей или центра экрана (поддерживает прозрачность)
rule_of_thirds: Показывать рамку правила третей
center_lines: Показывать рамку центра экрана
crosshair: Показывать перекрестие посреди экрана редактора камеры
letter_box: Показывать каше (aka чёрные полосы), которые сужают видимое пространство, захватываемое камерой
aspect_ratio: Пропорции для каше редактора камеры
Expand Down
18 changes: 0 additions & 18 deletions help/ru_RU/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,6 @@ aperture.gui:
config:
title: Опции камеры

outside: Внешний режим
spectator: Наблюдатель
show_path: Показать траекторию
sync: Синхронизация
flight: Режим полёта
flight_tooltip: Включает режим полёта, который позволяет управлять камерой в редакторе камеры посредством клавиш WASD а также управлять вращением мыши (для настройки комбинаций клавиш, зайдите в конфигурацию режима полёда Аперчер)
display_info: Отобразить позицию
minecrafttp_teleport: Использовать /minecraft:tp
tp_teleport: Использовать /tp
guides_color: Цвет направляющих
rule_of_thirds: Правило третей
center_lines: Центр экрана
crosshair: Перекрестие
letter_box: Каше
repeat: Повторить клип
overlay: Добавить оверлей
pick_overlay: Выбрать оверлей

tooltips:
jump_next_fixture: Перейти к следующему клипу
jump_next_frame: Перейти к следующему кадру
Expand Down
16 changes: 0 additions & 16 deletions help/zh_CN/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,6 @@ aperture.gui:
config:
title: 相机选项

outside: 分离相机模式
spectator: 观察者
show_path: 显示路径
sync: 同步
flight: 飞行模式
flight_tooltip: 启用飞行模式,可以在相机编辑器中使用 WASD 与鼠标拖拽来控制相机(请参见 Aperture 的飞行模式选项中的快捷键)
display_info: 显示位置
minecrafttp_teleport: 使用 /minecraft:tp
tp_teleport: 使用 /tp
rule_of_thirds: 三分法构图
crosshair: 十字准心
letter_box: 画面黑边
repeat: 循环播放关键点
overlay: 启用附加层
pick_overlay: 选择附加层

tooltips:
jump_next_fixture: 跳至下一关键点
jump_next_frame: 跳至下一帧
Expand Down
16 changes: 0 additions & 16 deletions help/zh_TW/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,6 @@ aperture.gui:
config:
title: 相機選項

outside: 分離相機模式
spectator: 觀察者
show_path: 顯示路徑
sync: 同步
flight: 飛行模式
flight_tooltip: 啟用飛行模式,可以在相機編輯器中使用 WASD 與鼠標拖拽來控制相機(請參見 Aperture 的飛行模式選項中的快捷鍵)
display_info: 顯示位置
minecrafttp_teleport: 使用 /minecraft:tp
tp_teleport: 使用 /tp
rule_of_thirds: 三分法構圖
crosshair: 十字準心
letter_box: 畫面黑邊
repeat: 循環播放關鍵點
overlay: 啟用附加層
pick_overlay: 選擇附加層

tooltips:
jump_next_fixture: 跳至下一關鍵點
jump_next_frame: 跳至下一幀
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/mchorse/aperture/Aperture.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

import mchorse.aperture.commands.CommandAperture;
import mchorse.mclib.McLib;
import mchorse.mclib.client.gui.utils.ValueColors;
import mchorse.mclib.commands.utils.L10n;
import mchorse.mclib.config.ConfigBuilder;
import mchorse.mclib.config.values.*;
import mchorse.mclib.config.values.ValueBoolean;
import mchorse.mclib.config.values.ValueFloat;
import mchorse.mclib.config.values.ValueInt;
import mchorse.mclib.config.values.ValueRL;
import mchorse.mclib.config.values.ValueString;
import mchorse.mclib.events.RegisterConfigEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
Expand Down Expand Up @@ -157,7 +160,7 @@ public void onConfigRegister(RegisterConfigEvent event)
editorOverlayRL = builder.getRL("overlay_rl", null);
editorF1Tooltip = builder.getBoolean("f1_tooltip", true);
editorDisplayPosition = builder.getBoolean("position", false);
editorGuidesColor = builder.getInt("guides_color",0xcccc0000);
editorGuidesColor = builder.getInt("guides_color", 0xcccc0000).colorAlpha();
editorRuleOfThirds = builder.getBoolean("rule_of_thirds", false);
editorCenterLines = builder.getBoolean("center_lines", false);
editorCrosshair = builder.getBoolean("crosshair", false);
Expand Down
10 changes: 7 additions & 3 deletions src/main/java/mchorse/aperture/camera/CameraExporter.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package mchorse.aperture.camera;

import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import info.ata4.minecraft.minema.Minema;
Expand All @@ -24,11 +23,16 @@
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;

import javax.vecmath.*;
import javax.vecmath.Matrix4d;
import javax.vecmath.Vector3d;
import javax.vecmath.Vector4d;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.DoubleBuffer;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;

/**
* This is an exporter for camera, entity and morph tracking data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1612,11 +1612,13 @@ private void drawOverlays()
Gui.drawRect(rx, ry + rh / 3 - 1, rx + rw, ry + rh / 3, color);
Gui.drawRect(rx, ry + rh - rh / 3, rx + rw, ry + rh - rh / 3 + 1, color);
}
if(Aperture.editorCenterLines.get())

if (Aperture.editorCenterLines.get())
{
int color = Aperture.editorGuidesColor.get();
this.drawHorizontalLine(0,this.width,this.height/2,color);
this.drawVerticalLine(this.width/2,0,this.height,color);

this.drawHorizontalLine(0, this.width, this.height / 2, color);
this.drawVerticalLine(this.width / 2, 0, this.height, color);
}

if (Aperture.editorCrosshair.get())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import mchorse.mclib.client.gui.framework.elements.input.GuiTextElement;
import mchorse.mclib.client.gui.framework.elements.input.GuiTexturePicker;
import mchorse.mclib.client.gui.utils.keys.IKey;
import mchorse.mclib.utils.Color;
import net.minecraft.client.Minecraft;

public class GuiConfigCameraOptions extends GuiAbstractConfigOptions
Expand Down Expand Up @@ -65,7 +64,7 @@ public GuiConfigCameraOptions(Minecraft mc, GuiCameraEditor editor)
this.displayPosition = new GuiToggleElement(mc, Aperture.editorDisplayPosition);
this.essentialsTeleport = new GuiToggleElement(mc, Aperture.essentialsTeleport);
this.guidesColor = new GuiColorElement(mc, Aperture.editorGuidesColor);
this.guidesColor.picker.editAlpha = true;
this.guidesColor.picker.editAlpha();
this.ruleOfThirds = new GuiToggleElement(mc, Aperture.editorRuleOfThirds);
this.centerLines = new GuiToggleElement(mc, Aperture.editorCenterLines);
this.crosshair = new GuiToggleElement(mc, Aperture.editorCrosshair);
Expand Down Expand Up @@ -120,7 +119,7 @@ public void update()
this.flight.toggled(this.editor.flight.isFlightEnabled());
this.displayPosition.toggled(Aperture.editorDisplayPosition.get());
this.essentialsTeleport.toggled(Aperture.essentialsTeleport.get());
this.guidesColor.picker.color = new Color(Aperture.editorGuidesColor.get());
this.guidesColor.picker.setColor(Aperture.editorGuidesColor.get());
this.ruleOfThirds.toggled(Aperture.editorRuleOfThirds.get());
this.centerLines.toggled(Aperture.editorCenterLines.get());
this.crosshair.toggled(Aperture.editorCrosshair.get());
Expand Down

0 comments on commit eaebf4d

Please sign in to comment.