remove post processing editor tab
This commit is contained in:
parent
b3874d4c39
commit
b77b5d2995
@ -1,7 +1,6 @@
|
||||
#if OS != .WASM {
|
||||
#load "iprof.jai";
|
||||
#load "picker.jai";
|
||||
#load "postprocess.jai";
|
||||
#load "trile_editor.jai";
|
||||
#load "level_editor.jai";
|
||||
}
|
||||
@ -15,7 +14,8 @@ Editor_View :: enum {
|
||||
Closed_Editor;
|
||||
Trile_Editor;
|
||||
Level_Editor;
|
||||
Post_Process_Editor;
|
||||
Animation_Editor;
|
||||
Material_Editor;
|
||||
};
|
||||
|
||||
current_editor_view : Editor_View = .Trile_Editor;
|
||||
@ -44,16 +44,20 @@ draw_editor_ui :: (theme: *GR.Overall_Theme) {
|
||||
GR.label(r, tprint("Trueno v%.%", V_MAJOR, V_MINOR), *t_label_left(theme));
|
||||
|
||||
r.x = 100*vw - r.w;
|
||||
if GR.button(r, "Level editor", *t_button_selectable(theme, current_editor_view == .Level_Editor))
|
||||
if GR.button(r, "Level studio", *t_button_selectable(theme, current_editor_view == .Level_Editor))
|
||||
then current_editor_view = .Level_Editor;
|
||||
|
||||
r.x -= r.w;
|
||||
if GR.button(r, "Trile editor", *t_button_selectable(theme, current_editor_view == .Trile_Editor))
|
||||
if GR.button(r, "Trile studio", *t_button_selectable(theme, current_editor_view == .Trile_Editor))
|
||||
then current_editor_view = .Trile_Editor;
|
||||
|
||||
r.x -= r.w;
|
||||
if GR.button(r, "Post-process", *t_button_selectable(theme, current_editor_view == .Post_Process_Editor))
|
||||
then current_editor_view = .Post_Process_Editor;
|
||||
if GR.button(r, "Animation studio", *t_button_selectable(theme, current_editor_view == .Animation_Editor))
|
||||
then current_editor_view = .Animation_Editor;
|
||||
|
||||
r.x -= r.w;
|
||||
if GR.button(r, "Material studio", *t_button_selectable(theme, current_editor_view == .Material_Editor))
|
||||
then current_editor_view = .Material_Editor;
|
||||
|
||||
|
||||
if current_editor_view == {
|
||||
@ -61,8 +65,6 @@ draw_editor_ui :: (theme: *GR.Overall_Theme) {
|
||||
draw_trile_editor_ui(theme);
|
||||
case .Level_Editor;
|
||||
draw_level_editor_ui(theme);
|
||||
case .Post_Process_Editor;
|
||||
draw_post_process_editor_ui(theme);
|
||||
}
|
||||
}
|
||||
draw_profiler();
|
||||
@ -83,8 +85,7 @@ draw_editor :: () {
|
||||
draw_trile_editor();
|
||||
case .Level_Editor;
|
||||
draw_level_editor();
|
||||
case .Post_Process_Editor;
|
||||
draw_post_process_editor();
|
||||
case .Animation_Editor;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -101,8 +102,7 @@ tick_editor_ui :: () {
|
||||
tick_trile_editor();
|
||||
case .Level_Editor;
|
||||
tick_level_editor();
|
||||
case .Post_Process_Editor;
|
||||
tick_post_process_editor();
|
||||
case .Animation_Editor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ tick_level_editor_camera :: () {
|
||||
editY = max(editY - 1, 0);
|
||||
}
|
||||
|
||||
if get_mouse_state(Key_Code.MOUSE_BUTTON_RIGHT) & .DOWN {
|
||||
if get_mouse_state(Key_Code.MOUSE_BUTTON_MIDDLE) & .DOWN {
|
||||
if mouse2Active {
|
||||
lastInputTime = get_time();
|
||||
diff := mouse2ActivationPosition - Vector2.{input_mouse_x, input_mouse_y};
|
||||
@ -154,7 +154,7 @@ tick_level_editor_camera :: () {
|
||||
}
|
||||
|
||||
|
||||
if get_mouse_state(Key_Code.MOUSE_BUTTON_MIDDLE) & .DOWN {
|
||||
if get_mouse_state(Key_Code.MOUSE_BUTTON_LEFT) & .DOWN {
|
||||
if mouse3Active {
|
||||
lastInputTime = get_time();
|
||||
diff := mouse3ActivationPosition - Vector2.{input_mouse_x, input_mouse_y};
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
#scope_file
|
||||
|
||||
get_post_processing_camera :: () -> Camera {
|
||||
camera : Camera;
|
||||
camera.target = Vector3.{0,0,0};
|
||||
camera.position = Vector3.{5,5,5};
|
||||
camera.near = 1.0;
|
||||
camera.far = 2000.0;
|
||||
return camera;
|
||||
}
|
||||
|
||||
#scope_export
|
||||
|
||||
tick_post_process_editor :: () {
|
||||
|
||||
}
|
||||
|
||||
draw_post_process_editor :: () {
|
||||
curworld := get_current_world();
|
||||
if !curworld.valid then return;
|
||||
create_set_cam_rendering_task(get_post_processing_camera(), curworld.world.conf.planeHeight);
|
||||
create_world_rendering_tasks(curworld.world);
|
||||
}
|
||||
|
||||
draw_post_process_editor_ui :: (theme: *GR.Overall_Theme) {
|
||||
draw_picker(theme);
|
||||
r := GR.get_rect(0, ui_h(5,0), ui_w(20, 20), ui_h(95, 0));
|
||||
ui_add_mouse_occluder(r);
|
||||
draw_bg_rectangle(r, theme);
|
||||
|
||||
r2 := r;
|
||||
r2.h = ui_h(5,0);
|
||||
r.h -= r2.h;
|
||||
r.y += r2.h;
|
||||
if GR.button(r2, "Save postprocessing", *theme.button_theme) {
|
||||
#if OS != .WASM {
|
||||
file :: #import "File";
|
||||
json := Jaison.json_write_string(current_post_process, " ");
|
||||
file.write_entire_file("./game/resources/postprocess.json", json);
|
||||
}
|
||||
}
|
||||
|
||||
autoedit(r, *current_post_process, theme);
|
||||
}
|
||||
@ -35,7 +35,7 @@ last_frame_time : float64;
|
||||
delta\ _time : float64;
|
||||
|
||||
V_MAJOR :: 0;
|
||||
V_MINOR :: 5;
|
||||
V_MINOR :: 6;
|
||||
|
||||
state: struct {
|
||||
pass_action_clear : sg_pass_action;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user