|
9 | 9 | --= |
10 | 10 | --============================================================]] |
11 | 11 |
|
| 12 | +export MAIN_PANEL_WIDTH :: 450 |
| 13 | +export DIALOG_WIDTH :: 400 |
| 14 | +export DIALOG_WIDTH_LOG :: 700 |
| 15 | +export DIALOG_WIDTH_EXPORT :: 550 |
| 16 | + |
12 | 17 | local BIG_BUTTON_HEIGHT :: 40 |
13 | 18 | local MEDIUM_BUTTON_HEIGHT :: 16 |
14 | 19 |
|
@@ -376,7 +381,7 @@ export setupGuiFrames :: () { |
376 | 381 | }), |
377 | 382 | }), |
378 | 383 |
|
379 | | - guiState.frame!({ name="exportProject", width=DIALOG_WIDTH, modal=true, layout=gui.Layout.FLOATING, active=false, |
| 384 | + guiState.frame!({ name="exportProject", width=DIALOG_WIDTH_EXPORT, modal=true, layout=gui.Layout.FLOATING, active=false, |
380 | 385 | guiState.text!({ text="Export", size=3 }), |
381 | 386 |
|
382 | 387 | guiState.separator!({ thick=false }), |
@@ -412,7 +417,9 @@ export setupGuiFrames :: () { |
412 | 417 | }), |
413 | 418 | guiState.inputText!({ name="exportProject_textures_directory", labelLeft="output folder", tooltip="Absolute path, or relative to base folder" }), |
414 | 419 | guiState.hbox!({ labelLeft="resulting paths", |
415 | | - guiState.text!({ name="exportProject_textures_pathResults", weight=1 }), |
| 420 | + guiState.scrollable!({ height=fontNormal.getHeight!()+2*(gui.SCROLLABLE_PADDING+gui.SPACING), weight=1, |
| 421 | + guiState.text!({ name="exportProject_textures_pathResults" }), |
| 422 | + }), |
416 | 423 | guiState.buttons!({ name="exportProject_textures_pathResultsInfo", buttons={{image="iconEye"}} }), |
417 | 424 | }), |
418 | 425 | }), |
@@ -456,7 +463,7 @@ export setupGuiFrames :: () { |
456 | 463 | guiState.buttons!({ height=BIG_BUTTON_HEIGHT, buttons={{name="util_popPanel",label="Close"}} }), |
457 | 464 | }), |
458 | 465 |
|
459 | | - guiState.frame!({ name="log", width=LOG_DIALOG_WIDTH, modal=true, layout=gui.Layout.FLOATING, active=false, |
| 466 | + guiState.frame!({ name="log", width=DIALOG_WIDTH_LOG, modal=true, layout=gui.Layout.FLOATING, active=false, |
460 | 467 | guiState.text!({ text="Log", size=3 }), |
461 | 468 |
|
462 | 469 | guiState.separator!({ thick=false }), |
@@ -515,13 +522,13 @@ export pushPanel :: (name:string) { |
515 | 522 | insert(panelStack, name) |
516 | 523 | } |
517 | 524 |
|
518 | | -export pushTempChoiceDialog :: (title:string, text:string, buttonList:[]gui.Button, cb:(choice:int), submitIndex=0, extraContent:gui.Element=NULL) { |
| 525 | +export pushTempChoiceDialog :: (title:string, text:string, buttonList:[]gui.Button, cb:(choice:int), submitIndex=0, extraContent:gui.Element=NULL, width=DIALOG_WIDTH) { |
519 | 526 | static tempN = 0 ; tempN += 1 |
520 | 527 |
|
521 | 528 | local name = format("temp%d", tempN) |
522 | 529 | local nameButtons = name.."_buttons" |
523 | 530 |
|
524 | | - local frame = guiState.frame!({ name=name, temp=true, layout=gui.Layout.FLOATING, modal=true, width=DIALOG_WIDTH, active=false }) |
| 531 | + local frame = guiState.frame!({ name=name, temp=true, layout=gui.Layout.FLOATING, modal=true, width=width, active=false }) |
525 | 532 | insert(guiState.frames, frame) |
526 | 533 |
|
527 | 534 | if title { |
@@ -2523,7 +2530,7 @@ export setupGuiCallbacks :: () { |
2523 | 2530 | } |
2524 | 2531 | } |
2525 | 2532 |
|
2526 | | - textEl.text = concatinate(paths, ", ") |
| 2533 | + textEl.text = concatinate(paths, "\n") |
2527 | 2534 | } |
2528 | 2535 | guiState.onRefresh.exportProject_textures_pathResultsInfo = (buttons:gui.Buttons) { |
2529 | 2536 | buttons.tooltip = guiState.getElement!("exportProject_textures_pathResults", gui.Text).text |
@@ -2662,11 +2669,11 @@ export setupGuiCallbacks :: () { |
2662 | 2669 | ) |
2663 | 2670 |
|
2664 | 2671 | local buttonList: []gui.Button |
2665 | | - for filesToConfirmOverwrite insert(buttonList, cast(gui.Button){ label=it }) |
| 2672 | + for filesToConfirmOverwrite insert(buttonList, cast(gui.Button){ label=it, tooltip=it }) |
2666 | 2673 |
|
2667 | 2674 | local fileListEl = guiState.buttons!({ vertical=true, align=gui.Alignment.LEFT, style=gui.Style.LIST, buttons=buttonList }) |
2668 | 2675 |
|
2669 | | - pushTempChoiceDialog("Confirm export", text, BUTTONS, submitIndex=1, extraContent=fileListEl, [writeExportFiles] (choice:int) { |
| 2676 | + pushTempChoiceDialog("Confirm export", text, BUTTONS, submitIndex=1, extraContent=fileListEl, width=DIALOG_WIDTH_EXPORT, [writeExportFiles] (choice:int) { |
2670 | 2677 | if choice ~= 1 return |
2671 | 2678 |
|
2672 | 2679 | writeExportFiles() |
@@ -3379,7 +3386,7 @@ export setupGuiCallbacks :: () { |
3379 | 3386 |
|
3380 | 3387 | guiState.onRefresh.log_text = (textEl:gui.Text) { |
3381 | 3388 | local s = concatinate(logStrings, "\n") |
3382 | | - local _, lines = fontNormal.getWrap!(s, LOG_DIALOG_WIDTH-20) -- @Ugly |
| 3389 | + local _, lines = fontNormal.getWrap!(s, DIALOG_WIDTH_LOG-20) -- @Ugly |
3383 | 3390 | textEl.text = concatinate(lines, "\n") |
3384 | 3391 | } |
3385 | 3392 |
|
|
0 commit comments