Commit Graph

17 Commits (master)

Author SHA1 Message Date
David Dormagen 8a8593e0ba Script GUI: added TightGridLayout style (requirement of #1842)
The TightGridLayout fills spaces more aggressively. This is slower but makes for a tighter layout. Finding the best layout is NP-complete. This here is just O(N^2) or so.
2016-11-05 15:35:15 +01:00
Maikel de Vries e18cee3a46 turn musket into blunderbuss
The musket was not a very popular and useful weapon, being inferior to the bow. It now shoots 5 weaker bullets in one shot with less damage per bullet, this might require some further testing and fine-tuning. Also the weaker bullets mean that they can be used in a gatling-gun (WIP) and in the airplane as well.
2016-08-22 16:32:48 +02:00
Maikel de Vries 8cabf67845 clean up tests: remove Teams.txt fix some titles 2016-01-20 19:44:28 +01:00
David Dormagen d5f4805f18 fixed desync
The desync was caused by PropList->GetProperties returning the properties in an arbitrary order. They are now sorted first.
The debug logs are left in place, because I assume that I will need them again and they prove to be helpful.
2015-08-02 19:12:09 +02:00
David Dormagen 4c69e19219 custom guis: correctly respect margins in grid layout and vertical layout 2015-01-20 20:44:13 +01:00
David Dormagen 6a875a1b29 CustomGuis: renamed several script functions to be more consistent; removed Gui_AddMargin as it is obsolete
All calls that reference an existing Gui window now start with "GuiUpdate" (exception: GuiClose). All other functions are always to be called DURING menu creation and layouting.
The "Margin" property replaces Gui_AddMargin.

find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/CustomGuiOpen/GuiOpen/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/CustomGuiClose/GuiClose/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/CustomGuiSetTag/GuiUpdateTag/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/CustomGuiUpdate/GuiUpdate/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/Gui_AddCloseButton/GuiAddCloseButton/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/Gui_UpdateText/GuiUpdateText/g'
find . -type f -name "*.c" -print0 | xargs -0 sed -i 's/Gui_AddSubwindow/GuiAddSubwindow/g'
2014-10-11 11:51:26 +02:00
David Dormagen 049088be78 CustomGUIs: major rework of layouting & controls; better integration of C4GUI 2014-10-11 11:29:02 +02:00
David Dormagen 75e776cb04 custom GUIs: added "Margin" property
The property can be used to give GUI windows a margin. Either the same margin in all directions (Margin = "1em") or different margins (Margin = ["1em", "2em", "10$", "0.5em"] - [left, top, right, bottom]).
2014-02-26 22:37:12 +01:00
David Dormagen 4346da8e4e custom GUIs: replace position properties X/Y/Wdt/Hgt with Left/Right/Top/Bottom that take strings instead of arrays, also change absolute unit from pixels to em
Before you'd define the X coordinate of the top-left corner of a window with X = [500, -40], now you do Left = "50%-4em". The em values currently do not scale with font-size yet, but it is important to do the formal change as early as possible to not have to do all work twice. Scaling of font and thus menus can be implemented later.
2014-02-17 15:46:36 +01:00
David Dormagen fa4638d6c0 custom GUIs: change order of arguments of GuiAction_SetTag from (target, id, tag) to (tag, id, target) 2014-02-16 17:18:34 +01:00
David Dormagen a0a76c051d custom GUI: removed "CreateCustomMenu" which was only a wrapper for "CreateObject" - use "CreateObject" now
This should reduce the confusion about why the function behaves so differently from Gui_Open: the style objects only provide an interface for those easy GUIs, they are not really part of the GUI system.
2014-02-15 18:59:33 +01:00
David Dormagen 5fa7c54842 MenuTest scenario: minor visual tweaks 2014-02-15 14:40:51 +01:00
David Dormagen 410a0ff5cb made the user-data parameter of a GUI_Call-action-callback the first (before player number, menuID etc.) to be more intuitive 2014-02-15 14:39:56 +01:00
David Dormagen 337126fcb9 renamed MenuWindow to GuiWindow
added HP-Bar-test to MenuTest.ocs
bugfix
2013-05-09 13:28:45 +02:00
David Dormagen 792ea0809c draw Decoration border outside of window rectangle (this is probably what the user would expect) 2013-04-28 17:03:32 +02:00
David Dormagen 1c05f22d41 added OnClose callback
more tests
minor fixes
2013-04-07 22:52:45 +02:00
David Dormagen c2ba7e65d7 improved menu functionality; added test scenario and helper objects 2013-04-04 18:36:27 +02:00