Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor enhancements #8903

Merged
merged 49 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
7b358f5
make text boxes in schedule editor uneditable
babaissarkar May 21, 2024
35fbf68
Add various error/confirmation messages
babaissarkar May 21, 2024
28d90dc
editor: change Load Game to Load Game/Scenario
babaissarkar May 21, 2024
dc617fa
convert absolute paths to wesnoth style relative paths
babaissarkar May 21, 2024
ac82d22
Merge branch 'master' of https://github.com/babaissarkar/wesnoth into…
babaissarkar May 21, 2024
b833b32
make schedule name translatable and write textdomain
babaissarkar May 22, 2024
19d2e02
ask to copy file if outside wesnoth's directories
babaissarkar May 22, 2024
28367a8
rearrange include file alphabetically
babaissarkar May 22, 2024
9786fac
adjust if condition in to_asset_path
babaissarkar May 23, 2024
99eea6b
Add preview icon
babaissarkar May 23, 2024
de7abf8
Add preview buttons for image and sound
babaissarkar May 23, 2024
b7ab96b
add success indication
babaissarkar May 22, 2024
d575887
update menu items
babaissarkar May 23, 2024
6c3fb10
various string fixes
babaissarkar May 23, 2024
64f136c
open in add-on's scenario directory when saving scenario
babaissarkar May 23, 2024
d5fbdb6
use the settings icon as icon for preferences menu item
babaissarkar May 24, 2024
bfb8762
add new items to addon menu
babaissarkar May 24, 2024
f068395
Save Scenario As only shown for scenarios
babaissarkar May 25, 2024
b0ad433
implement select addon and open addon menu items, code cleanup
babaissarkar May 25, 2024
e6aacfe
redesigned file dialog with new icons
babaissarkar May 27, 2024
2d3dd19
add "Open External" button to file dialog
babaissarkar May 28, 2024
b28cfbb
Add functionality to "Loyal" checkbox (#8445)
babaissarkar May 28, 2024
ee87304
move to_asset_path to filesystem and fix image showing bug
babaissarkar May 28, 2024
320e38c
remove unused comment
babaissarkar May 28, 2024
b1d0a53
do not allow maps to be saved in scenario folder or vice versa
babaissarkar May 29, 2024
85962a0
remove unnecessary comment
babaissarkar May 29, 2024
5652d8d
adjust unit editor layout
babaissarkar May 29, 2024
452a31a
image scaling and selection code simplication
babaissarkar May 30, 2024
626cd54
rewritten unit type editor using tab_container
babaissarkar May 30, 2024
9c65d1e
check extension of saved file (#8911)
babaissarkar May 31, 2024
3cec1e6
whitespace fix
babaissarkar May 31, 2024
f205146
stop the files panel from shrinking too much
babaissarkar Jun 5, 2024
692924b
show warning the first time user tries to save scenario in map folder…
babaissarkar Jun 19, 2024
8eac378
filename validation in file dialog
babaissarkar Jun 20, 2024
da83c9a
change validation text and add padding
babaissarkar Jun 20, 2024
2e1c3f2
move unitlist to Units menu inside editor and disable Status Table wh…
babaissarkar Jun 21, 2024
1b1b23e
support multiple extension in filemanager
babaissarkar Jun 21, 2024
b3128ff
support .mask extension in Save Map As dialog
babaissarkar Jun 21, 2024
3164ce8
save temporary maps or scenarios inside USERDATA/editor when reloadin…
babaissarkar Jun 25, 2024
94df4d8
Merge branch 'master' into editor_enhancements
babaissarkar Jun 25, 2024
aa2b04a
rename 'name' -> 'save_path'
babaissarkar Jun 25, 2024
04eecaf
Merge branch 'editor_enhancements' of https://github.com/babaissarkar…
babaissarkar Jun 25, 2024
afe0cff
map context loaded from memory instead of temp files when reloading
babaissarkar Jun 27, 2024
44553ba
move undo/redo stack and new save_all_maps() method, switch to last u…
babaissarkar Jun 28, 2024
5b89dfa
use vector of context_ptr and swap it with current map context to sav…
babaissarkar Jun 28, 2024
faaefb6
code refactor
babaissarkar Jun 29, 2024
d9b6952
use std::make_unique and remove context_ptr alias
babaissarkar Jun 29, 2024
da2fb0e
more refactor
babaissarkar Jun 29, 2024
627ee09
increase file dialog width and fix segfault
babaissarkar Jun 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion copyrights.csv
Original file line number Diff line number Diff line change
Expand Up @@ -17736,6 +17736,13 @@ Date,File,License,Author - Real Name(other name);Real Name(other name);etc,Notes
2013/05/26,images/icons/action/playlist_30-active.png,GNU GPL v2+,Emilien Rotival(LordBob),,,74fd5c0b4927aafc27e79c8a360fe2c8
2013/05/26,images/icons/action/playlist_30-pressed.png,GNU GPL v2+,Emilien Rotival(LordBob),,,4a4338bcdcd23b78ea227461c68fc867
2013/05/26,images/icons/action/playlist_30.png,GNU GPL v2+,Emilien Rotival(LordBob),,,d719535714ed129c56133c2a0d3cd704
2024/05/24,images/icons/action/preferences_25.png,GNU GPL v2+,Emilien Rotival(LordBob),"same as settings.png, scaled down",,6a827ee3ad77fd60b17e4ea7167d7907
2024/05/23,images/icons/action/preview_25-active.png,GNU GPL v2+,Subhraman Sarkar(babaissarkar),,,6ad340e7d910c9b0fa31ce79e09164f1
2024/05/24,images/icons/action/preview_25-pressed.png,GNU GPL v2+,Subhraman Sarkar(babaissarkar),,,f93f8e433440defa9b6743593c122ead
2024/05/25,images/icons/action/preview_25.png,GNU GPL v2+,Subhraman Sarkar(babaissarkar),,,a157e05242054558882f3c778e04717e
2024/05/26,images/icons/action/preview_30-active.png,GNU GPL v2+,Subhraman Sarkar(babaissarkar),,,3e92dd9e71fc3eb6f4c443960719eaec
2024/05/27,images/icons/action/preview_30-pressed.png,GNU GPL v2+,Subhraman Sarkar(babaissarkar),,,11fa82232a9564c68f3847a4197f1df9
2024/05/28,images/icons/action/preview_30.png,GNU GPL v2+,Subhraman Sarkar(babaissarkar),,,aaa5307d0142806fcdd108c75bfe8860
2013/04/29,images/icons/action/redo_25-active.png,GNU GPL v2+,Emilien Rotival(LordBob),,,b7643aaf484e4ea98ee362f3b1b33915
2013/04/29,images/icons/action/redo_25-pressed.png,GNU GPL v2+,Emilien Rotival(LordBob),,,2d71a8c4d3ea72a9dc2149e5d22437c2
2013/04/29,images/icons/action/redo_25.png,GNU GPL v2+,Emilien Rotival(LordBob),,,a4d057572a76752b3d40e0bc63228f16
Expand Down Expand Up @@ -18322,7 +18329,8 @@ Date,File,License,Author - Real Name(other name);Real Name(other name);etc,Notes
2011/03/11,images/misc/ellipse-selected-top.png,GNU GPL v2+,Jordà Polo(ettin);Lari Nieminen(zookeeper),,,383c573e6b6eb97e3d09ea97d63107e1
2011/03/11,images/misc/ellipse-top.png,GNU GPL v2+,Jordà Polo(ettin);Lari Nieminen(zookeeper),,,914b3908e00ab55071bde61dce55a6e6
2011/03/11,images/misc/eye.png,GNU GPL v2+,David White(dave),,,5e56c4e45341c3915664ca4f0c096897
2019/01/01,images/misc/folder-bookmark-icon.png,GNU GPL v2+,Emilien Rotival(LordBob),,,59a3279e2a6326f61b2f35531495d25e
2024/05/27,images/misc/file.png,GNU GPL v2+,Subhraman Sarkar(babaissarkar),,,edbfcfc60063ab4f5bfc2ccd09c4c7bd
2024/05/27,images/misc/folder-bookmark-icon.png,GNU GPL v2+,Subhraman Sarkar(babaissarkar);Emilien Rotival(LordBob),,,d325820e7532a93fbd76e230bbecc00b
2019/01/01,images/misc/folder-icon.png,GNU GPL v2+,Emilien Rotival(LordBob),,,2f646c254de628f5c388ce330d22918d
2011/03/11,images/misc/font8x8.png,GNU GPL v2+,unknown,,,f1b9efcedc4c8f5f46c890036469a538
2011/03/27,images/misc/hidden.png,GNU GPL v2+,Ali El Gariani(alink),,,508dc64614fd0b5d5abc492c39a4926d
Expand Down
10 changes: 9 additions & 1 deletion data/gui/widget/button_25x25.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,15 @@
"preview"
"Preview button"
"buttons/button_square/button_square_25"
"icons/action/zoomdefault_25"
"icons/action/preview_25"
()
}

{_GUI_DEFINITION
"play"
"Play button"
"buttons/button_square/button_square_25"
"icons/action/play_25"
()
}

Expand Down
50 changes: 45 additions & 5 deletions data/gui/window/custom_tod.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### Definition of the custom tod window in the editor.
###

#define _GUI_DATA_PATH_ENTRY ID_STEM LABEL
#define _GUI_DATA_PATH_ENTRY ID_STEM LABEL PREVIEW_BUTTON
[row]
grow_factor = 0

Expand Down Expand Up @@ -33,9 +33,12 @@
[text_box]
id = "path_" + {ID_STEM}
definition = "default"
editable = false
[/text_box]

[/column]

{PREVIEW_BUTTON}

[column]
grow_factor = 0
Expand Down Expand Up @@ -72,6 +75,42 @@
[/row]
#enddef

#define _GUI_DATA_PATH_ENTRY_IMAGE ID_STEM LABEL
{_GUI_DATA_PATH_ENTRY {ID_STEM} {LABEL} (
[column]
grow_factor = 0

border = "all"
border_size = 5
horizontal_grow = true

[button]
id = "preview_" + {ID_STEM}
definition = "preview"
tooltip = _ "Preview image"
[/button]
[/column]
)}
#enddef

#define _GUI_DATA_PATH_ENTRY_SOUND ID_STEM LABEL
{_GUI_DATA_PATH_ENTRY {ID_STEM} {LABEL} (
[column]
grow_factor = 0

border = "all"
border_size = 5
horizontal_grow = true

[button]
id = "preview_" + {ID_STEM}
definition = "play"
tooltip = _ "Play sound"
[/button]
[/column]
)}
#enddef

#define _GUI_COLOR_SLIDER _ID _LABEL
[row]
grow_factor = 0
Expand Down Expand Up @@ -310,9 +349,9 @@

[grid]

{_GUI_DATA_PATH_ENTRY "image" ( _ "Image:")}
{_GUI_DATA_PATH_ENTRY "mask" ( _ "Mask:")}
{_GUI_DATA_PATH_ENTRY "sound" ( _ "Sound:")}
{_GUI_DATA_PATH_ENTRY_IMAGE "image" ( _ "Image:")}
{_GUI_DATA_PATH_ENTRY_IMAGE "mask" ( _ "Mask:")}
{_GUI_DATA_PATH_ENTRY_SOUND "sound" ( _ "Sound:")}

[/grid]

Expand Down Expand Up @@ -454,8 +493,9 @@
horizontal_alignment = "right"

[button]
id = "preview"
id = "preview_color"
definition = "preview"
tooltip = _ "Preview color changes on map"
[/button]
[/column]

Expand Down
Loading
Loading