Merged from revision: 6824

Map Editor Fixes/Improvements (by Buggler)
- Better UI feedback after last item deleted from item stack in editor item mode
- Improved editor room number increment code. 'Shift + LMB' when drawing room numbers will reuse same room number on next input
- externalized hardcoded button tooltip text in editor tile selection window 

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6825 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2014-01-26 08:15:40 +00:00
parent 405b073416
commit d4aa35a66e
16 changed files with 127 additions and 34 deletions
+1
View File
@@ -113,6 +113,7 @@ void SetEditorBuildingTaskbarMode( UINT16 usNewMode )
UnclickEditorButton( BUILDING_COPY_BUILDING );
UnclickEditorButton( BUILDING_MOVE_BUILDING );
UnclickEditorButton( BUILDING_DRAW_ROOMNUM );
UnclickEditorButton( BUILDING_ERASE_ROOMNUM );
ClickEditorButton( usNewMode );
gfRenderDrawingMode = TRUE;
+8
View File
@@ -1169,8 +1169,16 @@ void DeleteSelectedItem()
gpCurrItemPoolNode = pIPHead;
if( gpCurrItemPoolNode )
{
//get the item pool at this node's gridno.
GetItemPoolFromGround( gpCurrItemPoolNode->sGridNo, &gpItemPool );
Assert( gpItemPool );
MarkMapIndexDirty( gpItemPool->sGridNo );
SpecifyItemToEdit( &gWorldItems[ gpItemPool->iItemIndex ].object, gpItemPool->sGridNo );
if( gsItemGridNo != -1 )
{
CenterScreenAtMapIndex( gsItemGridNo );
}
}
//remove node
HideItemCursor( sGridNo );
+1 -1
View File
@@ -398,7 +398,7 @@ void ExecuteItemStatsCmd( /*UINT8*/ UINT16 ubAction )
case ITEMSTATS_DEFAULT:
break;
case ITEMSTATS_DELETE:
if ( gbEditingMode != EDITING_NOTHING )
if( gbEditingMode != EDITING_NOTHING )
DeleteSelectedItem();
break;
case ITEMSTATS_SHOW:
+12 -2
View File
@@ -4375,8 +4375,18 @@ void ProcessAreaSelection( BOOLEAN fWithLeftButton )
DrawObjectsBasedOnSelectionRegion();
if( gusCurrRoomNumber > 0 )
{
gusCurrRoomNumber++;
gusMaxRoomNumber++;
if( gusCurrRoomNumber == gusMaxRoomNumber )
gusMaxRoomNumber++;
//retain existing room number
if ( _KeyDown( SHIFT ) )
{
//Do nothing
}
else
{
gusCurrRoomNumber = gusMaxRoomNumber;
}
if( iCurrentTaskbar == TASK_BUILDINGS && TextInputMode() )
{
CHAR16 str[4];
+10 -10
View File
@@ -194,33 +194,33 @@ void CreateJA2SelectionWindow( INT16 sWhat )
iSelectWin = CreateHotSpot(0, 0, 600, 360, MSYS_PRIORITY_HIGH,
DEFAULT_MOVE_CALLBACK, SelWinClkCallback);
iCancelWin = CreateIconButton((INT16)iButtonIcons[SEL_WIN_CANCEL_ICON], 0,
BUTTON_USE_DEFAULT, 600, 40,
40, 40, BUTTON_TOGGLE,
MSYS_PRIORITY_HIGH,
DEFAULT_MOVE_CALLBACK, CnclClkCallback);
SetButtonFastHelpText(iCancelWin,L"Cancel selections");
iOkWin = CreateIconButton((INT16)iButtonIcons[SEL_WIN_OK_ICON], 0,
BUTTON_USE_DEFAULT, 600, 0,
40, 40, BUTTON_TOGGLE,
MSYS_PRIORITY_HIGH,
DEFAULT_MOVE_CALLBACK, OkClkCallback);
SetButtonFastHelpText(iOkWin,L"Accept selections");
SetButtonFastHelpText(iOkWin,pDisplaySelectionWindowButtonText[0]);
iCancelWin = CreateIconButton((INT16)iButtonIcons[SEL_WIN_CANCEL_ICON], 0,
BUTTON_USE_DEFAULT, 600, 40,
40, 40, BUTTON_TOGGLE,
MSYS_PRIORITY_HIGH,
DEFAULT_MOVE_CALLBACK, CnclClkCallback);
SetButtonFastHelpText(iCancelWin,pDisplaySelectionWindowButtonText[1]);
iScrollUp = CreateIconButton((INT16)iButtonIcons[SEL_WIN_UP_ICON], 0,
BUTTON_USE_DEFAULT, 600, 80,
40, 160, BUTTON_NO_TOGGLE,
MSYS_PRIORITY_HIGH,
DEFAULT_MOVE_CALLBACK, UpClkCallback);
SetButtonFastHelpText(iScrollUp,L"Scroll window up");
SetButtonFastHelpText(iScrollUp,pDisplaySelectionWindowButtonText[2]);
iScrollDown = CreateIconButton((INT16)iButtonIcons[SEL_WIN_DOWN_ICON], 0,
BUTTON_USE_DEFAULT, 600, 240,
40, 160, BUTTON_NO_TOGGLE,
MSYS_PRIORITY_HIGH,
DEFAULT_MOVE_CALLBACK, DwnClkCallback);
SetButtonFastHelpText(iScrollDown,L"Scroll window down");
SetButtonFastHelpText(iScrollDown,pDisplaySelectionWindowButtonText[3]);
fButtonsPresent = TRUE;