mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-23 09:52:57 +00:00
A little more Editor; stopping for lunch.
This was SVN commit r1691.
This commit is contained in:
@@ -44,9 +44,15 @@
|
||||
<!-- MAP CREATOR SECTION MENU -->
|
||||
<object type="empty" name="atlas_left_pane_section_map" size="0 0 100% 100%" z="1" hidden="true">
|
||||
<!-- MAP SIZE SETTINGS -->
|
||||
<object type="input" name="atlas_left_pane_section_map_tile_height_input_box" sprite="atlas_input_box" style="atlas_label_text" hidden="false">
|
||||
<object type="text" name="atlas_left_pane_section_map_size_label" style="atlas_label_text" hidden="false">Size:
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_tile_height_input_box", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX], left_screen, top_screen, left_screen, top_screen);
|
||||
setSizeArray("atlas_left_pane_section_map_size_label", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_LABEL], left_screen, top_screen, left_screen, top_screen);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="input" name="atlas_left_pane_section_map_tile_width_input_box" sprite="atlas_input_box" style="atlas_label_text" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_tile_width_input_box", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_TILE_WIDTH_INPUT_BOX], left_screen, top_screen, left_screen, top_screen);
|
||||
GUIObjectSetCaption("atlas_left_pane_section_map_tile_width_input_box",200);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="text" name="atlas_left_pane_section_map_tile_x" style="atlas_label_text" hidden="false">X
|
||||
@@ -54,14 +60,10 @@
|
||||
setSizeArray("atlas_left_pane_section_map_tile_x", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_TILE_X], left_screen, top_screen, left_screen, top_screen);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="input" name="atlas_left_pane_section_map_tile_width_input_box" sprite="atlas_input_box" style="atlas_label_text" hidden="false">
|
||||
<object type="input" name="atlas_left_pane_section_map_tile_height_input_box" sprite="atlas_input_box" style="atlas_label_text" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_tile_width_input_box", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_TILE_WIDTH_INPUT_BOX], left_screen, top_screen, left_screen, top_screen);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="text" name="atlas_left_pane_section_map_size_label" style="atlas_label_text" hidden="false">Size:
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_size_label", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_LABEL], left_screen, top_screen, left_screen, top_screen);
|
||||
setSizeArray("atlas_left_pane_section_map_tile_height_input_box", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX], left_screen, top_screen, left_screen, top_screen);
|
||||
GUIObjectSetCaption("atlas_left_pane_section_map_tile_height_input_box",200);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="empty" name="atlas_left_pane_section_map_size_radio" size="0 0 100% 100%" z="1" hidden="false">
|
||||
@@ -69,21 +71,37 @@
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_size_button_small", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_SMALL], left_screen, top_screen, left_screen, top_screen);
|
||||
]]></action>
|
||||
<action on="Press"><![CDATA[
|
||||
GUIObjectSetCaption("atlas_left_pane_section_map_tile_width_input_box", 100);
|
||||
GUIObjectSetCaption("atlas_left_pane_section_map_tile_height_input_box", 100);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="atlas_left_pane_section_map_size_button_medium" style="atlas_button" font="tahoma9" hidden="false">Medium
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_size_button_medium", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_MEDIUM], left_screen, top_screen, left_screen, top_screen);
|
||||
]]></action>
|
||||
<action on="Press"><![CDATA[
|
||||
GUIObjectSetCaption("atlas_left_pane_section_map_tile_width_input_box", 200);
|
||||
GUIObjectSetCaption("atlas_left_pane_section_map_tile_height_input_box", 200);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="atlas_left_pane_section_map_size_button_large" style="atlas_button" hidden="false">Large
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_size_button_large", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_LARGE], left_screen, top_screen, left_screen, top_screen);
|
||||
]]></action>
|
||||
<action on="Press"><![CDATA[
|
||||
GUIObjectSetCaption("atlas_left_pane_section_map_tile_width_input_box", 300);
|
||||
GUIObjectSetCaption("atlas_left_pane_section_map_tile_height_input_box", 300);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="atlas_left_pane_section_map_size_button_huge" style="atlas_button" hidden="false">Huge
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_size_button_huge", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_SIZE_BUTTON_HUGE], left_screen, top_screen, left_screen, top_screen);
|
||||
]]></action>
|
||||
<action on="Press"><![CDATA[
|
||||
GUIObjectSetCaption("atlas_left_pane_section_map_tile_width_input_box", 400);
|
||||
GUIObjectSetCaption("atlas_left_pane_section_map_tile_height_input_box", 400);
|
||||
]]></action>
|
||||
</object>
|
||||
</object>
|
||||
<object type="text" name="atlas_left_pane_section_map_size_hr" sprite="atlas_hline" hidden="false">
|
||||
@@ -100,17 +118,24 @@
|
||||
<object type="input" name="atlas_left_pane_section_map_settings_player_input_box" sprite="atlas_input_box" style="atlas_label_text" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_settings_player_input_box", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX], left_screen, mid_screen, left_screen, mid_screen);
|
||||
GUIObjectSetCaption("atlas_left_pane_section_map_settings_player_input_box", 4);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="atlas_left_pane_section_map_settings_player_input_box_up" sprite="atlas_sheet_updown_button" cell_id="0" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_settings_player_input_box_up", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX_UP], left_screen, mid_screen, left_screen, mid_screen);
|
||||
]]></action>
|
||||
<action on="Press"><![CDATA[
|
||||
GUIObjectModifyCaption("atlas_left_pane_section_map_settings_player_input_box", 1);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="atlas_left_pane_section_map_settings_player_input_box_dn" sprite="atlas_sheet_updown_button" cell_id="1" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_settings_player_input_box_dn", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_PLAYER_INPUT_BOX_DN], left_screen, mid_screen, left_screen, mid_screen);
|
||||
]]></action>
|
||||
<action on="Press"><![CDATA[
|
||||
GUIObjectModifyCaption("atlas_left_pane_section_map_settings_player_input_box", -1);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="text" name="atlas_left_pane_section_map_settings_settlement_label" style="atlas_label_text" hidden="false">Settlements:
|
||||
<action on="Load"><![CDATA[
|
||||
@@ -120,17 +145,24 @@
|
||||
<object type="input" name="atlas_left_pane_section_map_settings_settlement_input_box" sprite="atlas_input_box" style="atlas_label_text" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_settings_settlement_input_box", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX], left_screen, mid_screen, left_screen, mid_screen);
|
||||
GUIObjectSetCaption("atlas_left_pane_section_map_settings_settlement_input_box", 2);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="atlas_left_pane_section_map_settings_settlement_input_box_up" sprite="atlas_sheet_updown_button" cell_id="0" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_settings_settlement_input_box_up", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX_UP], left_screen, mid_screen, left_screen, mid_screen);
|
||||
]]></action>
|
||||
<action on="Press"><![CDATA[
|
||||
GUIObjectModifyCaption("atlas_left_pane_section_map_settings_settlement_input_box", 1);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="atlas_left_pane_section_map_settings_settlement_input_box_dn" sprite="atlas_sheet_updown_button" cell_id="1" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_settings_settlement_input_box_dn", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_SETTLEMENT_INPUT_BOX_DN], left_screen, mid_screen, left_screen, mid_screen);
|
||||
]]></action>
|
||||
<action on="Press"><![CDATA[
|
||||
GUIObjectModifyCaption("atlas_left_pane_section_map_settings_settlement_input_box", -1);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="text" name="atlas_left_pane_section_map_settings_resources_label" style="atlas_label_text" hidden="false">Resources:
|
||||
<action on="Load"><![CDATA[
|
||||
@@ -141,6 +173,7 @@
|
||||
<object type="input" name="atlas_left_pane_section_map_settings_resources_combo_box" sprite="atlas_input_box" style="atlas_label_text" hidden="false">
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_map_settings_resources_combo_box", atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_SETTINGS_RESOURCES_COMBO_BOX], left_screen, mid_screen, left_screen, mid_screen);
|
||||
GUIObjectSetCaption("atlas_left_pane_section_map_settings_resources_combo_box", "Normal");
|
||||
]]></action>
|
||||
</object>
|
||||
<!-- GENERATE -->
|
||||
@@ -178,6 +211,21 @@
|
||||
|
||||
<!-- TERRAIN EDITOR SECTION MENU -->
|
||||
<object type="empty" name="atlas_left_pane_section_terrain" size="0 0 100% 100%" z="1" hidden="true">
|
||||
<object type="button" name="atlas_left_pane_section_terrain_elevation_modify_button" style="atlas_button" hidden="false">Modify
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_terrain_elevation_modify_button", atlasCoord[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON], left_screen, top_screen, left_screen, top_screen);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="atlas_left_pane_section_terrain_elevation_smooth_button" style="atlas_button" hidden="false">Smooth
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_terrain_elevation_smooth_button", atlasCoord[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SMOOTH_BUTTON], left_screen, top_screen, left_screen, top_screen);
|
||||
]]></action>
|
||||
</object>
|
||||
<object type="button" name="atlas_left_pane_section_terrain_elevation_sample_button" style="atlas_button" hidden="false">Sample
|
||||
<action on="Load"><![CDATA[
|
||||
setSizeArray("atlas_left_pane_section_terrain_elevation_sample_button", atlasCoord[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON], left_screen, top_screen, left_screen, top_screen);
|
||||
]]></action>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ function initAtlas()
|
||||
|
||||
// Height input box for map size.
|
||||
ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX = addSizeArrayWH(atlasCoord, atlasCoord_Last,
|
||||
30,
|
||||
58,
|
||||
14
|
||||
); atlasCoord_Last = addSizeArrayXY(atlasCoord, atlasCoord_Last,
|
||||
atlasCoord[ATLAS_LEFT_PANE_SECTION_HEADING_2].x+atlasCoord[ATLAS_LEFT_PANE_SECTION_HEADING_2].width-atlasCoord[ATLAS_LEFT_PANE_SECTION_MAP_TILE_HEIGHT_INPUT_BOX].width-ATLAS_LEFT_PANE_SECTION.RMARGIN,
|
||||
@@ -496,6 +496,40 @@ function initAtlas()
|
||||
atlasCoord[ATLAS_LEFT_PANE_SECTION_GENERATE_BORDER].x+ATLAS_LEFT_PANE_SECTION_GENERATE_SPAN,
|
||||
atlasCoord[ATLAS_LEFT_PANE_SECTION_GENERATE_BORDER].y+ATLAS_LEFT_PANE_SECTION_GENERATE_SPAN
|
||||
);
|
||||
|
||||
// ============================================= TERRAIN EDITOR SECTION MENU ===============================================
|
||||
|
||||
// ============================================= TERRAIN EDITOR: EDIT ELEVATION ===============================================
|
||||
|
||||
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_BUTTON_SPAN = 10;
|
||||
|
||||
// Modify button.
|
||||
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON = addSizeArrayWH(atlasCoord, atlasCoord_Last,
|
||||
50,
|
||||
15
|
||||
); atlasCoord_Last = addSizeArrayXY(atlasCoord, atlasCoord_Last,
|
||||
atlasCoord[ATLAS_LEFT_PANE_SECTION_HEADING_2].x+ATLAS_LEFT_PANE_SECTION.LMARGIN,
|
||||
atlasCoord[ATLAS_LEFT_PANE_SECTION_HEADING_2].y+atlasCoord[ATLAS_LEFT_PANE_SECTION_HEADING_2].height+ATLAS_LEFT_PANE_SECTION.TMARGIN
|
||||
);
|
||||
|
||||
// Smooth button.
|
||||
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SMOOTH_BUTTON = addSizeArrayWH(atlasCoord, atlasCoord_Last,
|
||||
atlasCoord[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].width,
|
||||
atlasCoord[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].height
|
||||
); atlasCoord_Last = addSizeArrayXY(atlasCoord, atlasCoord_Last,
|
||||
atlasCoord[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].x+atlasCoord[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].width+ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_BUTTON_SPAN,
|
||||
atlasCoord[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].y
|
||||
);
|
||||
|
||||
// Sample button.
|
||||
ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SAMPLE_BUTTON = addSizeArrayWH(atlasCoord, atlasCoord_Last,
|
||||
atlasCoord[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].width,
|
||||
atlasCoord[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].height
|
||||
); atlasCoord_Last = addSizeArrayXY(atlasCoord, atlasCoord_Last,
|
||||
atlasCoord[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SMOOTH_BUTTON].x+atlasCoord[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_SMOOTH_BUTTON].width+ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_BUTTON_SPAN,
|
||||
atlasCoord[ATLAS_LEFT_PANE_SECTION_TERRAIN_ELEVATION_MODIFY_BUTTON].y
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
@@ -615,4 +649,3 @@ function atlasOpenSectionMenu(atlasMenuName)
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
|
||||
@@ -43,3 +43,25 @@ function GUIObjectRenameandReveal(objectName, objectCaption)
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function GUIObjectModifyCaption(objectName, objectModifier)
|
||||
{
|
||||
// Adds a modifier to a GUI object's caption (eg increase a number by 1).
|
||||
// Obviously don't use this unless you're sure the caption contains a number.
|
||||
|
||||
// Get our GUI object
|
||||
var GUIObject = getGUIObjectByName(objectName);
|
||||
|
||||
GUIObject.caption = parseInt(GUIObject.caption) + parseInt(objectModifier);
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function GUIObjectSetCaption(objectName, objectCaption)
|
||||
{
|
||||
// Sets an object's caption to the specified value.
|
||||
|
||||
// Get our GUI object
|
||||
var GUIObject = getGUIObjectByName(objectName);
|
||||
|
||||
GUIObject.caption = objectCaption;
|
||||
}
|
||||
Reference in New Issue
Block a user