Skip to content

Commit

Permalink
Forge test
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Dec 3, 2024
1 parent bbe60d9 commit dd4ac5e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
2 changes: 2 additions & 0 deletions armorforge/sources/base_ext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function base_ext_render() {
}

function base_ext_init_config(raw: config_t) {
raw.window_w = 1920;
raw.window_h = 1080;
raw.layer_res = texture_res_t.RES8192;
raw.undo_steps = 1;
}
Expand Down
16 changes: 1 addition & 15 deletions armorforge/sources/tab_scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,7 @@ function tab_scene_draw(htab: ui_handle_t) {
}
ui_end_sticky();

let outliner_handle: ui_handle_t = ui_handle(__ID__);
if (outliner_handle.init) {
outliner_handle.selected = true;
}

if (ui_panel(outliner_handle, "Outliner", true, false)) {
{
ui._y -= ui_ELEMENT_OFFSET(ui);

tab_scene_line_counter = 0;
Expand Down Expand Up @@ -299,14 +294,5 @@ function tab_scene_draw(htab: ui_handle_t) {
}
}
}

if (ui_button("Play")) {
sim_play();

context_raw.selected_object = scene_camera.base;
}
if (ui_button("Stop")) {
sim_stop();
}
}
}
11 changes: 11 additions & 0 deletions armorforge/sources/ui_header_ext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@
function ui_header_draw_tool_properties(ui: ui_t) {
if (context_raw.tool == workspace_tool_t.GIZMO) {

if (!sim_running && ui_button("Play")) {
sim_play();
context_raw.selected_object = scene_camera.base;
}

if (sim_running && ui_button("Stop")) {
sim_stop();
}

let h_record: ui_handle_t = ui_handle(__ID__);
let record: bool = ui_check(h_record, tr("Record"));
}
}

0 comments on commit dd4ac5e

Please sign in to comment.