diff options
| author | oy <Tom_Adams@web.de> | 2011-03-20 17:04:03 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-03-20 17:04:03 +0100 |
| commit | 8d159ce65a867889db62c4827f25951de33fe106 (patch) | |
| tree | 9351ff1b0e60e348afb5cb0614969ec456f33c5f /src/game/editor | |
| parent | 192d6a0b135d1aeeb7d21f24d963921d6f34e336 (diff) | |
| download | zcatch-8d159ce65a867889db62c4827f25951de33fe106.tar.gz zcatch-8d159ce65a867889db62c4827f25951de33fe106.zip | |
removed localisation in the editor
Diffstat (limited to 'src/game/editor')
| -rw-r--r-- | src/game/editor/ed_editor.cpp | 168 | ||||
| -rw-r--r-- | src/game/editor/ed_layer_quads.cpp | 2 | ||||
| -rw-r--r-- | src/game/editor/ed_layer_tiles.cpp | 12 | ||||
| -rw-r--r-- | src/game/editor/ed_popups.cpp | 60 |
4 files changed, 120 insertions, 122 deletions
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp index 323df8b1..5420b9a2 100644 --- a/src/game/editor/ed_editor.cpp +++ b/src/game/editor/ed_editor.cpp @@ -622,7 +622,7 @@ void CEditor::DoToolbar(CUIRect ToolBar) // ctrl+o to open if(Input()->KeyDown('o') && (Input()->KeyPressed(KEY_LCTRL) || Input()->KeyPressed(KEY_RCTRL))) - InvokeFileDialog(IStorage::TYPE_ALL, FILETYPE_MAP, Localize("Load map"), Localize("Load"), "maps", "", CallbackOpenMap, this); + InvokeFileDialog(IStorage::TYPE_ALL, FILETYPE_MAP, "Load map", "Load", "maps", "", CallbackOpenMap, this); // ctrl+s to save if(Input()->KeyDown('s') && (Input()->KeyPressed(KEY_LCTRL) || Input()->KeyPressed(KEY_RCTRL))) @@ -630,13 +630,13 @@ void CEditor::DoToolbar(CUIRect ToolBar) if(m_aFileName[0] && m_ValidSaveFilename) CallbackSaveMap(m_aFileName, IStorage::TYPE_SAVE, this); else - InvokeFileDialog(IStorage::TYPE_SAVE, FILETYPE_MAP, Localize("Save map"), Localize("Save"), "maps", "", CallbackSaveMap, this); + InvokeFileDialog(IStorage::TYPE_SAVE, FILETYPE_MAP, "Save map", "Save", "maps", "", CallbackSaveMap, this); } // detail button TB_Top.VSplitLeft(30.0f, &Button, &TB_Top); static int s_HqButton = 0; - if(DoButton_Editor(&s_HqButton, Localize("HD"), m_ShowDetail, &Button, 0, Localize("[ctrl+h] Toggle High Detail")) || + if(DoButton_Editor(&s_HqButton, "HD", m_ShowDetail, &Button, 0, "[ctrl+h] Toggle High Detail") || (Input()->KeyDown('h') && (Input()->KeyPressed(KEY_LCTRL) || Input()->KeyPressed(KEY_RCTRL)))) { m_ShowDetail = !m_ShowDetail; @@ -647,7 +647,7 @@ void CEditor::DoToolbar(CUIRect ToolBar) // animation button TB_Top.VSplitLeft(40.0f, &Button, &TB_Top); static int s_AnimateButton = 0; - if(DoButton_Editor(&s_AnimateButton, Localize("Anim"), m_Animate, &Button, 0, Localize("[ctrl+m] Toggle animation")) || + if(DoButton_Editor(&s_AnimateButton, "Anim", m_Animate, &Button, 0, "[ctrl+m] Toggle animation") || (Input()->KeyDown('m') && (Input()->KeyPressed(KEY_LCTRL) || Input()->KeyPressed(KEY_RCTRL)))) { m_AnimateStart = time_get(); @@ -659,7 +659,7 @@ void CEditor::DoToolbar(CUIRect ToolBar) // proof button TB_Top.VSplitLeft(40.0f, &Button, &TB_Top); static int s_ProofButton = 0; - if(DoButton_Editor(&s_ProofButton, Localize("Proof"), m_ProofBorders, &Button, 0, Localize("[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.")) || + if(DoButton_Editor(&s_ProofButton, "Proof", m_ProofBorders, &Button, 0, "[ctrl+p] Toggles proof borders. These borders represent what a player maximum can see.") || (Input()->KeyDown('p') && (Input()->KeyPressed(KEY_LCTRL) || Input()->KeyPressed(KEY_RCTRL)))) { m_ProofBorders = !m_ProofBorders; @@ -670,7 +670,7 @@ void CEditor::DoToolbar(CUIRect ToolBar) // tile info button TB_Top.VSplitLeft(40.0f, &Button, &TB_Top); static int s_TileInfoButton = 0; - if(DoButton_Editor(&s_TileInfoButton, Localize("Info"), m_ShowTileInfo, &Button, 0, Localize("[ctrl+i] Show tile informations")) || + if(DoButton_Editor(&s_TileInfoButton, "Info", m_ShowTileInfo, &Button, 0, "[ctrl+i] Show tile informations") || (Input()->KeyDown('i') && (Input()->KeyPressed(KEY_LCTRL) || Input()->KeyPressed(KEY_RCTRL)))) { m_ShowTileInfo = !m_ShowTileInfo; @@ -681,12 +681,12 @@ void CEditor::DoToolbar(CUIRect ToolBar) // zoom group TB_Top.VSplitLeft(30.0f, &Button, &TB_Top); static int s_ZoomOutButton = 0; - if(DoButton_Ex(&s_ZoomOutButton, Localize("ZO"), 0, &Button, 0, Localize("[NumPad-] Zoom out"), CUI::CORNER_L) || Input()->KeyDown(KEY_KP_MINUS)) + if(DoButton_Ex(&s_ZoomOutButton, "ZO", 0, &Button, 0, "[NumPad-] Zoom out", CUI::CORNER_L) || Input()->KeyDown(KEY_KP_MINUS)) m_ZoomLevel += 50; TB_Top.VSplitLeft(30.0f, &Button, &TB_Top); static int s_ZoomNormalButton = 0; - if(DoButton_Ex(&s_ZoomNormalButton, "1:1", 0, &Button, 0, Localize("[NumPad*] Zoom to normal and remove editor offset"), 0) || Input()->KeyDown(KEY_KP_MULTIPLY)) + if(DoButton_Ex(&s_ZoomNormalButton, "1:1", 0, &Button, 0, "[NumPad*] Zoom to normal and remove editor offset", 0) || Input()->KeyDown(KEY_KP_MULTIPLY)) { m_EditorOffsetX = 0; m_EditorOffsetY = 0; @@ -695,7 +695,7 @@ void CEditor::DoToolbar(CUIRect ToolBar) TB_Top.VSplitLeft(30.0f, &Button, &TB_Top); static int s_ZoomInButton = 0; - if(DoButton_Ex(&s_ZoomInButton, Localize("ZI"), 0, &Button, 0, Localize("[NumPad+] Zoom in"), CUI::CORNER_R) || Input()->KeyDown(KEY_KP_PLUS)) + if(DoButton_Ex(&s_ZoomInButton, "ZI", 0, &Button, 0, "[NumPad+] Zoom in", CUI::CORNER_R) || Input()->KeyDown(KEY_KP_PLUS)) m_ZoomLevel -= 50; TB_Top.VSplitLeft(10.0f, 0, &TB_Top); @@ -703,17 +703,17 @@ void CEditor::DoToolbar(CUIRect ToolBar) // animation speed TB_Top.VSplitLeft(30.0f, &Button, &TB_Top); static int s_AnimFasterButton = 0; - if(DoButton_Ex(&s_AnimFasterButton, "A+", 0, &Button, 0, Localize("Increase animation speed"), CUI::CORNER_L)) + if(DoButton_Ex(&s_AnimFasterButton, "A+", 0, &Button, 0, "Increase animation speed", CUI::CORNER_L)) m_AnimateSpeed += 0.5f; TB_Top.VSplitLeft(30.0f, &Button, &TB_Top); static int s_AnimNormalButton = 0; - if(DoButton_Ex(&s_AnimNormalButton, "1", 0, &Button, 0, Localize("Normal animation speed"), 0)) + if(DoButton_Ex(&s_AnimNormalButton, "1", 0, &Button, 0, "Normal animation speed", 0)) m_AnimateSpeed = 1.0f; TB_Top.VSplitLeft(30.0f, &Button, &TB_Top); static int s_AnimSlowerButton = 0; - if(DoButton_Ex(&s_AnimSlowerButton, "A-", 0, &Button, 0, Localize("Decrease animation speed"), CUI::CORNER_R)) + if(DoButton_Ex(&s_AnimSlowerButton, "A-", 0, &Button, 0, "Decrease animation speed", CUI::CORNER_R)) { if(m_AnimateSpeed > 0.5f) m_AnimateSpeed -= 0.5f; @@ -739,7 +739,7 @@ void CEditor::DoToolbar(CUIRect ToolBar) // flip buttons TB_Top.VSplitLeft(30.0f, &Button, &TB_Top); static int s_FlipXButton = 0; - if(DoButton_Ex(&s_FlipXButton, "X/X", Enabled, &Button, 0, Localize("[N] Flip brush horizontal"), CUI::CORNER_L) || Input()->KeyDown('n')) + if(DoButton_Ex(&s_FlipXButton, "X/X", Enabled, &Button, 0, "[N] Flip brush horizontal", CUI::CORNER_L) || Input()->KeyDown('n')) { for(int i = 0; i < m_Brush.m_lLayers.size(); i++) m_Brush.m_lLayers[i]->BrushFlipX(); @@ -747,7 +747,7 @@ void CEditor::DoToolbar(CUIRect ToolBar) TB_Top.VSplitLeft(30.0f, &Button, &TB_Top); static int s_FlipyButton = 0; - if(DoButton_Ex(&s_FlipyButton, "Y/Y", Enabled, &Button, 0, Localize("[M] Flip brush vertical"), CUI::CORNER_R) || Input()->KeyDown('m')) + if(DoButton_Ex(&s_FlipyButton, "Y/Y", Enabled, &Button, 0, "[M] Flip brush vertical", CUI::CORNER_R) || Input()->KeyDown('m')) { for(int i = 0; i < m_Brush.m_lLayers.size(); i++) m_Brush.m_lLayers[i]->BrushFlipY(); @@ -767,12 +767,12 @@ void CEditor::DoToolbar(CUIRect ToolBar) s_RotationAmount = max(90, (s_RotationAmount/90)*90); break; } - s_RotationAmount = UiDoValueSelector(&s_RotationAmount, &Button, "", s_RotationAmount, TileLayer?90:1, 359, TileLayer?90:1, TileLayer?10.0f:2.0f, Localize("Rotation of the brush in degrees. Use left mouse button to drag and change the value. Hold shift to be more precise.")); + s_RotationAmount = UiDoValueSelector(&s_RotationAmount, &Button, "", s_RotationAmount, TileLayer?90:1, 359, TileLayer?90:1, TileLayer?10.0f:2.0f, "Rotation of the brush in degrees. Use left mouse button to drag and change the value. Hold shift to be more precise."); TB_Top.VSplitLeft(5.0f, &Button, &TB_Top); TB_Top.VSplitLeft(30.0f, &Button, &TB_Top); static int s_CcwButton = 0; - if(DoButton_Ex(&s_CcwButton, Localize("CCW"), Enabled, &Button, 0, Localize("[R] Rotates the brush counter clockwise"), CUI::CORNER_L) || Input()->KeyDown('r')) + if(DoButton_Ex(&s_CcwButton, "CCW", Enabled, &Button, 0, "[R] Rotates the brush counter clockwise", CUI::CORNER_L) || Input()->KeyDown('r')) { for(int i = 0; i < m_Brush.m_lLayers.size(); i++) m_Brush.m_lLayers[i]->BrushRotate(-s_RotationAmount/360.0f*pi*2); @@ -780,7 +780,7 @@ void CEditor::DoToolbar(CUIRect ToolBar) TB_Top.VSplitLeft(30.0f, &Button, &TB_Top); static int s_CwButton = 0; - if(DoButton_Ex(&s_CwButton, Localize("CW"), Enabled, &Button, 0, Localize("[T] Rotates the brush clockwise"), CUI::CORNER_R) || Input()->KeyDown('t')) + if(DoButton_Ex(&s_CwButton, "CW", Enabled, &Button, 0, "[T] Rotates the brush clockwise", CUI::CORNER_R) || Input()->KeyDown('t')) { for(int i = 0; i < m_Brush.m_lLayers.size(); i++) m_Brush.m_lLayers[i]->BrushRotate(s_RotationAmount/360.0f*pi*2); @@ -796,7 +796,7 @@ void CEditor::DoToolbar(CUIRect ToolBar) CLayerQuads *pQLayer = (CLayerQuads *)GetSelectedLayerType(0, LAYERTYPE_QUADS); //CLayerTiles *tlayer = (CLayerTiles *)get_selected_layer_type(0, LAYERTYPE_TILES); - if(DoButton_Editor(&s_NewButton, Localize("Add Quad"), pQLayer?0:-1, &Button, 0, Localize("Adds a new quad"))) + if(DoButton_Editor(&s_NewButton, "Add Quad", pQLayer?0:-1, &Button, 0, "Adds a new quad")) { if(pQLayer) { @@ -822,7 +822,7 @@ void CEditor::DoToolbar(CUIRect ToolBar) static int s_BorderBut = 0; CLayerTiles *pT = (CLayerTiles *)GetSelectedLayerType(0, LAYERTYPE_TILES); - if(DoButton_Editor(&s_BorderBut, Localize("Border"), pT?0:-1, &Button, 0, Localize("Adds border tiles"))) + if(DoButton_Editor(&s_BorderBut, "Border", pT?0:-1, &Button, 0, "Adds border tiles")) { if(pT) DoMapBorder(); @@ -834,7 +834,7 @@ void CEditor::DoToolbar(CUIRect ToolBar) // refocus button TB_Bottom.VSplitLeft(50.0f, &Button, &TB_Bottom); static int s_RefocusButton = 0; - if(DoButton_Editor(&s_RefocusButton, Localize("Refocus"), m_WorldOffsetX&&m_WorldOffsetY?0:-1, &Button, 0, Localize("[HOME] Restore map focus")) || Input()->KeyDown(KEY_HOME)) + if(DoButton_Editor(&s_RefocusButton, "Refocus", m_WorldOffsetX&&m_WorldOffsetY?0:-1, &Button, 0, "[HOME] Restore map focus") || Input()->KeyDown(KEY_HOME)) { m_WorldOffsetX = 0; m_WorldOffsetY = 0; @@ -945,7 +945,7 @@ void CEditor::DoQuad(CQuad *q, int Index) ms_pUiGotContext = pID; Graphics()->SetColor(1,1,1,1); - m_pTooltip = Localize("Left mouse button to move. Hold shift to move pivot. Hold ctrl to rotate."); + m_pTooltip = "Left mouse button to move. Hold shift to move pivot. Hold ctrl to rotate."; if(UI()->MouseButton(0)) { @@ -1088,7 +1088,7 @@ void CEditor::DoQuadPoint(CQuad *pQuad, int QuadIndex, int V) ms_pUiGotContext = pID; Graphics()->SetColor(1,1,1,1); - m_pTooltip = Localize("Left mouse button to move. Hold shift to move the texture."); + m_pTooltip = "Left mouse button to move. Hold shift to move the texture."; if(UI()->MouseButton(0)) { @@ -1280,9 +1280,9 @@ void CEditor::DoMapEditor(CUIRect View, CUIRect ToolBar) if(UI()->HotItem() == s_pEditorID) { if(m_Brush.IsEmpty()) - m_pTooltip = Localize("Use left mouse button to drag and create a brush."); + m_pTooltip = "Use left mouse button to drag and create a brush."; else - m_pTooltip = Localize("Use left mouse button to paint with the brush. Right button clears the brush."); + m_pTooltip = "Use left mouse button to paint with the brush. Right button clears the brush."; if(UI()->ActiveItem() == s_pEditorID) { @@ -1622,12 +1622,12 @@ int CEditor::DoProperties(CUIRect *pToolBox, CProperty *pProps, int *pIDs, int * RenderTools()->DrawUIRect(&Shifter, vec4(1,1,1,0.5f), 0, 0.0f); UI()->DoLabel(&Shifter, aBuf, 10.0f, 0, -1); - if(DoButton_ButtonDec(&pIDs[i], 0, 0, &Dec, 0, Localize("Decrease"))) + if(DoButton_ButtonDec(&pIDs[i], 0, 0, &Dec, 0, "Decrease")) { *pNewVal = pProps[i].m_Value-1; Change = i; } - if(DoButton_ButtonInc(((char *)&pIDs[i])+1, 0, 0, &Inc, 0, Localize("Increase"))) + if(DoButton_ButtonInc(((char *)&pIDs[i])+1, 0, 0, &Inc, 0, "Increase")) { *pNewVal = pProps[i].m_Value+1; Change = i; @@ -1637,12 +1637,12 @@ int CEditor::DoProperties(CUIRect *pToolBox, CProperty *pProps, int *pIDs, int * { CUIRect No, Yes; Shifter.VSplitMid(&No, &Yes); - if(DoButton_ButtonDec(&pIDs[i], Localize("No"), !pProps[i].m_Value, &No, 0, "")) + if(DoButton_ButtonDec(&pIDs[i], "No", !pProps[i].m_Value, &No, 0, "")) { *pNewVal = 0; Change = i; } - if(DoButton_ButtonInc(((char *)&pIDs[i])+1, Localize("Yes"), pProps[i].m_Value, &Yes, 0, "")) + if(DoButton_ButtonInc(((char *)&pIDs[i])+1, "Yes", pProps[i].m_Value, &Yes, 0, "")) { *pNewVal = 1; Change = i; @@ -1650,7 +1650,7 @@ int CEditor::DoProperties(CUIRect *pToolBox, CProperty *pProps, int *pIDs, int * } else if(pProps[i].m_Type == PROPTYPE_INT_SCROLL) { - int NewValue = UiDoValueSelector(&pIDs[i], &Shifter, "", pProps[i].m_Value, pProps[i].m_Min, pProps[i].m_Max, 1, 1.0f, Localize("Use left mouse button to drag and change the value. Hold shift to be more precise.")); + int NewValue = UiDoValueSelector(&pIDs[i], &Shifter, "", pProps[i].m_Value, pProps[i].m_Min, pProps[i].m_Max, 1, 1.0f, "Use left mouse button to drag and change the value. Hold shift to be more precise."); if(NewValue != pProps[i].m_Value) { *pNewVal = NewValue; @@ -1666,7 +1666,7 @@ int CEditor::DoProperties(CUIRect *pToolBox, CProperty *pProps, int *pIDs, int * for(int c = 0; c < 4; c++) { int v = (pProps[i].m_Value >> s_aShift[c])&0xff; - NewColor |= UiDoValueSelector(((char *)&pIDs[i])+c, &Shifter, s_paTexts[c], v, 0, 255, 1, 1.0f, Localize("Use left mouse button to drag and change the color value. Hold shift to be more precise."))<<s_aShift[c]; + NewColor |= UiDoValueSelector(((char *)&pIDs[i])+c, &Shifter, s_paTexts[c], v, 0, 255, 1, 1.0f, "Use left mouse button to drag and change the color value. Hold shift to be more precise.")<<s_aShift[c]; if(c != 3) { @@ -1686,7 +1686,7 @@ int CEditor::DoProperties(CUIRect *pToolBox, CProperty *pProps, int *pIDs, int * { char aBuf[64]; if(pProps[i].m_Value < 0) - str_copy(aBuf, Localize("None"), sizeof(aBuf)); + str_copy(aBuf, "None", sizeof(aBuf)); else str_format(aBuf, sizeof(aBuf),"%s", m_Map.m_lImages[pProps[i].m_Value]->m_aName); @@ -1714,22 +1714,22 @@ int CEditor::DoProperties(CUIRect *pToolBox, CProperty *pProps, int *pIDs, int * Shifter.VSplitRight(10.0f, &Shifter, &Down); RenderTools()->DrawUIRect(&Shifter, vec4(1,1,1,0.5f), 0, 0.0f); UI()->DoLabel(&Shifter, "Y", 10.0f, 0, -1); - if(DoButton_ButtonDec(&pIDs[i], "-", 0, &Left, 0, Localize("Left"))) + if(DoButton_ButtonDec(&pIDs[i], "-", 0, &Left, 0, "Left")) { *pNewVal = 1; Change = i; } - if(DoButton_ButtonInc(((char *)&pIDs[i])+3, "+", 0, &Right, 0, Localize("Right"))) + if(DoButton_ButtonInc(((char *)&pIDs[i])+3, "+", 0, &Right, 0, "Right")) { *pNewVal = 2; Change = i; } - if(DoButton_ButtonDec(((char *)&pIDs[i])+1, "-", 0, &Up, 0, Localize("Up"))) + if(DoButton_ButtonDec(((char *)&pIDs[i])+1, "-", 0, &Up, 0, "Up")) { *pNewVal = 4; Change = i; } - if(DoButton_ButtonInc(((char *)&pIDs[i])+2, "+", 0, &Down, 0, Localize("Down"))) + if(DoButton_ButtonInc(((char *)&pIDs[i])+2, "+", 0, &Down, 0, "Down")) { *pNewVal = 8; Change = i; @@ -1802,17 +1802,17 @@ void CEditor::RenderLayers(CUIRect ToolBox, CUIRect ToolBar, CUIRect View) { LayersBox.HSplitTop(12.0f, &Slot, &LayersBox); Slot.VSplitLeft(12, &VisibleToggle, &Slot); - if(DoButton_Ex(&m_Map.m_lGroups[g]->m_Visible, m_Map.m_lGroups[g]->m_Visible?"V":"H", 0, &VisibleToggle, 0, Localize("Toggle group visibility"), CUI::CORNER_L)) + if(DoButton_Ex(&m_Map.m_lGroups[g]->m_Visible, m_Map.m_lGroups[g]->m_Visible?"V":"H", 0, &VisibleToggle, 0, "Toggle group visibility", CUI::CORNER_L)) m_Map.m_lGroups[g]->m_Visible = !m_Map.m_lGroups[g]->m_Visible; Slot.VSplitRight(12.0f, &Slot, &SaveCheck); - if(DoButton_Ex(&m_Map.m_lGroups[g]->m_SaveToMap, "S", m_Map.m_lGroups[g]->m_SaveToMap, &SaveCheck, 0, Localize("Enable/disable group for saving"), CUI::CORNER_R)) + if(DoButton_Ex(&m_Map.m_lGroups[g]->m_SaveToMap, "S", m_Map.m_lGroups[g]->m_SaveToMap, &SaveCheck, 0, "Enable/disable group for saving", CUI::CORNER_R)) if(!m_Map.m_lGroups[g]->m_GameGroup) m_Map.m_lGroups[g]->m_SaveToMap = !m_Map.m_lGroups[g]->m_SaveToMap; str_format(aBuf, sizeof(aBuf),"#%d %s", g, m_Map.m_lGroups[g]->m_pName); if(int Result = DoButton_Ex(&m_Map.m_lGroups[g], aBuf, g==m_SelectedGroup, &Slot, - BUTTON_CONTEXT, Localize("Select group. Right click for properties."), 0)) + BUTTON_CONTEXT, "Select group. Right click for properties.", 0)) { m_SelectedGroup = g; m_SelectedLayer = 0; @@ -1840,17 +1840,17 @@ void CEditor::RenderLayers(CUIRect ToolBox, CUIRect ToolBar, CUIRect View) Slot.VSplitLeft(12.0f, 0, &Button); Button.VSplitLeft(15, &VisibleToggle, &Button); - if(DoButton_Ex(&m_Map.m_lGroups[g]->m_lLayers[i]->m_Visible, m_Map.m_lGroups[g]->m_lLayers[i]->m_Visible?"V":"H", 0, &VisibleToggle, 0, Localize("Toggle layer visibility"), CUI::CORNER_L)) + if(DoButton_Ex(&m_Map.m_lGroups[g]->m_lLayers[i]->m_Visible, m_Map.m_lGroups[g]->m_lLayers[i]->m_Visible?"V":"H", 0, &VisibleToggle, 0, "Toggle layer visibility", CUI::CORNER_L)) m_Map.m_lGroups[g]->m_lLayers[i]->m_Visible = !m_Map.m_lGroups[g]->m_lLayers[i]->m_Visible; Button.VSplitRight(12.0f, &Button, &SaveCheck); - if(DoButton_Ex(&m_Map.m_lGroups[g]->m_lLayers[i]->m_SaveToMap, "S", m_Map.m_lGroups[g]->m_lLayers[i]->m_SaveToMap, &SaveCheck, 0, Localize("Enable/disable layer for saving"), CUI::CORNER_R)) + if(DoButton_Ex(&m_Map.m_lGroups[g]->m_lLayers[i]->m_SaveToMap, "S", m_Map.m_lGroups[g]->m_lLayers[i]->m_SaveToMap, &SaveCheck, 0, "Enable/disable layer for saving", CUI::CORNER_R)) if(m_Map.m_lGroups[g]->m_lLayers[i] != m_Map.m_pGameLayer) m_Map.m_lGroups[g]->m_lLayers[i]->m_SaveToMap = !m_Map.m_lGroups[g]->m_lLayers[i]->m_SaveToMap; - str_format(aBuf, sizeof(aBuf),"#%d %s ", i, Localize(m_Map.m_lGroups[g]->m_lLayers[i]->m_pTypeName)); // Localize("Game");Localize("Quads");Localize("Tiles"); + str_format(aBuf, sizeof(aBuf),"#%d %s ", i, m_Map.m_lGroups[g]->m_lLayers[i]->m_pTypeName); if(int Result = DoButton_Ex(m_Map.m_lGroups[g]->m_lLayers[i], aBuf, g==m_SelectedGroup&&i==m_SelectedLayer, &Button, - BUTTON_CONTEXT, Localize("Select layer. Right click for properties."), 0)) + BUTTON_CONTEXT, "Select layer. Right click for properties.", 0)) { m_SelectedLayer = i; m_SelectedGroup = g; @@ -1873,7 +1873,7 @@ void CEditor::RenderLayers(CUIRect ToolBox, CUIRect ToolBar, CUIRect View) LayersBox.HSplitTop(12.0f, &Slot, &LayersBox); static int s_NewGroupButton = 0; - if(DoButton_Editor(&s_NewGroupButton, Localize("Add group"), 0, &Slot, 0, Localize("Adds a new group"))) + if(DoButton_Editor(&s_NewGroupButton, "Add group", 0, &Slot, 0, "Adds a new group")) { m_Map.NewGroup(); m_SelectedGroup = m_Map.m_lGroups.size()-1; @@ -1962,7 +1962,7 @@ int CEditor::PopupImage(CEditor *pEditor, CUIRect View) static int s_ExternalButton = 0; if(pImg->m_External) { - if(pEditor->DoButton_MenuItem(&s_ExternalButton, Localize("Embed"), 0, &Slot, 0, Localize("Embeds the image into the map file."))) + if(pEditor->DoButton_MenuItem(&s_ExternalButton, "Embed", 0, &Slot, 0, "Embeds the image into the map file.")) { pImg->m_External = 0; return 1; @@ -1970,7 +1970,7 @@ int CEditor::PopupImage(CEditor *pEditor, CUIRect View) } else { - if(pEditor->DoButton_MenuItem(&s_ExternalButton, Localize("Make external"), 0, &Slot, 0, Localize("Removes the image from the map file."))) + if(pEditor->DoButton_MenuItem(&s_ExternalButton, "Make external", 0, &Slot, 0, "Removes the image from the map file.")) { pImg->m_External = 1; return 1; @@ -1979,15 +1979,15 @@ int CEditor::PopupImage(CEditor *pEditor, CUIRect View) View.HSplitTop(10.0f, &Slot, &View); View.HSplitTop(12.0f, &Slot, &View); - if(pEditor->DoButton_MenuItem(&s_ReplaceButton, Localize("Replace"), 0, &Slot, 0, Localize("Replaces the image with a new one"))) + if(pEditor->DoButton_MenuItem(&s_ReplaceButton, "Replace", 0, &Slot, 0, "Replaces the image with a new one")) { - pEditor->InvokeFileDialog(IStorage::TYPE_ALL, FILETYPE_IMG, Localize("Replace Image"), Localize("Replace"), "mapres", "", ReplaceImage, pEditor); + pEditor->InvokeFileDialog(IStorage::TYPE_ALL, FILETYPE_IMG, "Replace Image", "Replace", "mapres", "", ReplaceImage, pEditor); return 1; } View.HSplitTop(10.0f, &Slot, &View); View.HSplitTop(12.0f, &Slot, &View); - if(pEditor->DoButton_MenuItem(&s_RemoveButton, Localize("Remove"), 0, &Slot, 0, Localize("Removes the image from the map"))) + if(pEditor->DoButton_MenuItem(&s_RemoveButton, "Remove", 0, &Slot, 0, "Removes the image from the map")) { delete pImg; pEditor->m_Map.m_lImages.remove_index(pEditor->m_SelectedImage); @@ -2078,9 +2078,9 @@ void CEditor::RenderImages(CUIRect ToolBox, CUIRect ToolBar, CUIRect View) ToolBox.HSplitTop(15.0f, &Slot, &ToolBox); if(e == 0) - UI()->DoLabel(&Slot, Localize("Embedded"), 12.0f, 0); + UI()->DoLabel(&Slot, "Embedded", 12.0f, 0); else - UI()->DoLabel(&Slot, Localize("External"), 12.0f, 0); + UI()->DoLabel(&Slot, "External", 12.0f, 0); } ImageCur += 15.0f; @@ -2106,7 +2106,7 @@ void CEditor::RenderImages(CUIRect ToolBox, CUIRect ToolBar, CUIRect View) ToolBox.HSplitTop(12.0f, &Slot, &ToolBox); if(int Result = DoButton_Editor(&m_Map.m_lImages[i], aBuf, m_SelectedImage == i, &Slot, - BUTTON_CONTEXT, Localize("Select image"))) + BUTTON_CONTEXT, "Select image")) { m_SelectedImage = i; @@ -2147,8 +2147,8 @@ void CEditor::RenderImages(CUIRect ToolBox, CUIRect ToolBar, CUIRect View) static int s_NewImageButton = 0; ToolBox.HSplitTop(10.0f, &Slot, &ToolBox); ToolBox.HSplitTop(12.0f, &Slot, &ToolBox); - if(DoButton_Editor(&s_NewImageButton, Localize("Add"), 0, &Slot, 0, Localize("Load a new image to use in the map"))) - InvokeFileDialog(IStorage::TYPE_ALL, FILETYPE_IMG, Localize("Add Image"), Localize("Add"), "mapres", "", AddImage, this); + if(DoButton_Editor(&s_NewImageButton, "Add", 0, &Slot, 0, "Load a new image to use in the map")) + InvokeFileDialog(IStorage::TYPE_ALL, FILETYPE_IMG, "Add Image", "Add", "mapres", "", AddImage, this); } @@ -2239,7 +2239,7 @@ void CEditor::RenderFileDialog() if(m_FileDialogStorageType == IStorage::TYPE_SAVE) { static int s_FileBoxID = 0; - UI()->DoLabel(&FileBoxLabel, Localize("Filename:"), 10.0f, -1, -1); + UI()->DoLabel(&FileBoxLabel, "Filename:", 10.0f, -1, -1); if(DoEditBox(&s_FileBoxID, &FileBox, m_aFileDialogFileName, sizeof(m_aFileDialogFileName), 10.0f)) { // remove '/' and '\' @@ -2335,7 +2335,7 @@ void CEditor::RenderFileDialog() CUIRect Button; ButtonBar.VSplitRight(50.0f, &ButtonBar, &Button); bool IsDir = m_FilesSelectedIndex >= 0 && m_FileList[m_FilesSelectedIndex].m_IsDir; - if(DoButton_Editor(&s_OkButton, IsDir ? Localize("Open") : m_pFileDialogButtonText, 0, &Button, 0, 0) || m_aFileDialogActivate) + if(DoButton_Editor(&s_OkButton, IsDir ? "Open" : m_pFileDialogButtonText, 0, &Button, 0, 0) || m_aFileDialogActivate) { m_aFileDialogActivate = false; if(IsDir) // folder @@ -2377,14 +2377,14 @@ void CEditor::RenderFileDialog() ButtonBar.VSplitRight(40.0f, &ButtonBar, &Button); ButtonBar.VSplitRight(50.0f, &ButtonBar, &Button); - if(DoButton_Editor(&s_CancelButton, Localize("Cancel"), 0, &Button, 0, 0) || Input()->KeyPressed(KEY_ESCAPE)) + if(DoButton_Editor(&s_CancelButton, "Cancel", 0, &Button, 0, 0) || Input()->KeyPressed(KEY_ESCAPE)) m_Dialog = DIALOG_NONE; if(m_FileDialogStorageType == IStorage::TYPE_SAVE) { ButtonBar.VSplitLeft(40.0f, 0, &ButtonBar); ButtonBar.VSplitLeft(70.0f, &Button, &ButtonBar); - if(DoButton_Editor(&s_NewFolderButton, Localize("New folder"), 0, &Button, 0, 0)) + if(DoButton_Editor(&s_NewFolderButton, "New folder", 0, &Button, 0, 0)) { if(*m_aFileDialogFileName) { @@ -2458,8 +2458,8 @@ void CEditor::RenderModebar(CUIRect View) View.VSplitLeft(65.0f, &Button, &View); Button.HSplitTop(30.0f, 0, &Button); static int s_Button = 0; - const char *pButName = m_Mode == MODE_LAYERS ? Localize("Layers") : Localize("Images"); - if(DoButton_Tab(&s_Button, pButName, 0, &Button, 0, Localize("Switch between images and layers managment."))) + const char *pButName = m_Mode == MODE_LAYERS ? "Layers" : "Images"; + if(DoButton_Tab(&s_Button, pButName, 0, &Button, 0, "Switch between images and layers managment.")) { if(m_Mode == MODE_LAYERS) m_Mode = MODE_IMAGES; @@ -2476,7 +2476,7 @@ void CEditor::RenderStatusbar(CUIRect View) CUIRect Button; View.VSplitRight(60.0f, &View, &Button); static int s_EnvelopeButton = 0; - if(DoButton_Editor(&s_EnvelopeButton, Localize("Envelopes"), m_ShowEnvelopeEditor, &Button, 0, Localize("Toggles the envelope editor."))) + if(DoButton_Editor(&s_EnvelopeButton, "Envelopes", m_ShowEnvelopeEditor, &Button, 0, "Toggles the envelope editor.")) m_ShowEnvelopeEditor = (m_ShowEnvelopeEditor+1)%4; if(m_pTooltip) @@ -2484,7 +2484,7 @@ void CEditor::RenderStatusbar(CUIRect View) if(ms_pUiGotContext && ms_pUiGotContext == UI()->HotItem()) { char aBuf[512]; - str_format(aBuf, sizeof(aBuf), Localize("%s Right click for context menu."), m_pTooltip); + str_format(aBuf, sizeof(aBuf), "%s Right click for context menu.", m_pTooltip); UI()->DoLabel(&View, aBuf, 10.0f, -1, -1); } else @@ -2514,13 +2514,13 @@ void CEditor::RenderEnvelopeEditor(CUIRect View) ToolBar.VSplitRight(50.0f, &ToolBar, &Button); static int s_New4dButton = 0; - if(DoButton_Editor(&s_New4dButton, Localize("Color+"), 0, &Button, 0, Localize("Creates a new color envelope"))) + if(DoButton_Editor(&s_New4dButton, "Color+", 0, &Button, 0, "Creates a new color envelope")) pNewEnv = m_Map.NewEnvelope(4); ToolBar.VSplitRight(5.0f, &ToolBar, &Button); ToolBar.VSplitRight(50.0f, &ToolBar, &Button); static int s_New2dButton = 0; - if(DoButton_Editor(&s_New2dButton, Localize("Pos.+"), 0, &Button, 0, Localize("Creates a new pos envelope"))) + if(DoButton_Editor(&s_New2dButton, "Pos.+", 0, &Button, 0, "Creates a new pos envelope")) pNewEnv = m_Map.NewEnvelope(3); // Delete button @@ -2529,7 +2529,7 @@ void CEditor::RenderEnvelopeEditor(CUIRect View) ToolBar.VSplitRight(10.0f, &ToolBar, &Button); ToolBar.VSplitRight(50.0f, &ToolBar, &Button); static int s_DelButton = 0; - if(DoButton_Editor(&s_DelButton, Localize("Delete"), 0, &Button, 0, Localize("Delete this envelope"))) + if(DoButton_Editor(&s_DelButton, "Delete", 0, &Button, 0, "Delete this envelope")) { m_Map.DeleteEnvelope(m_SelectedEnvelope); if(m_SelectedEnvelope >= m_Map.m_lEnvelopes.size()) @@ -2562,18 +2562,18 @@ void CEditor::RenderEnvelopeEditor(CUIRect View) UI()->DoLabel(&Shifter, aBuf, 10.0f, 0, -1); static int s_PrevButton = 0; - if(DoButton_ButtonDec(&s_PrevButton, 0, 0, &Dec, 0, Localize("Previous Envelope"))) + if(DoButton_ButtonDec(&s_PrevButton, 0, 0, &Dec, 0, "Previous Envelope")) m_SelectedEnvelope--; static int s_NextButton = 0; - if(DoButton_ButtonInc(&s_NextButton, 0, 0, &Inc, 0, Localize("Next Envelope"))) + if(DoButton_ButtonInc(&s_NextButton, 0, 0, &Inc, 0, "Next Envelope")) m_SelectedEnvelope++; if(pEnvelope) { ToolBar.VSplitLeft(15.0f, &Button, &ToolBar); ToolBar.VSplitLeft(35.0f, &Button, &ToolBar); - UI()->DoLabel(&Button, Localize("Name:"), 10.0f, -1, -1); + UI()->DoLabel(&Button, "Name:", 10.0f, -1, -1); ToolBar.VSplitLeft(80.0f, &Button, &ToolBar); @@ -2611,8 +2611,8 @@ void CEditor::RenderEnvelopeEditor(CUIRect View) }; const char *paDescriptions[2][4] = { - {Localize("X-axis of the envelope"), Localize("Y-axis of the envelope"), Localize("Rotation of the envelope"), ""}, - {Localize("Red value of the envelope"), Localize("Green value of the envelope"), Localize("Blue value of the envelope"), Localize("Alpha value of the envelope")}, + {"X-axis of the envelope", "Y-axis of the envelope", "Rotation of the envelope", ""}, + {"Red value of the envelope", "Green value of the envelope", "Blue value of the envelope", "Alpha value of the envelope"}, }; static int s_aChannelButtons[4] = {0}; @@ -2668,7 +2668,7 @@ void CEditor::RenderEnvelopeEditor(CUIRect View) f2fx(aChannels[2]), f2fx(aChannels[3])); } - m_pTooltip = Localize("Press right mouse button to create a new point"); + m_pTooltip = "Press right mouse button to create a new point"; } } @@ -2729,7 +2729,7 @@ void CEditor::RenderEnvelopeEditor(CUIRect View) "N", "L", "S", "F", "M" }; - if(DoButton_Editor(pID, paTypeName[pEnvelope->m_lPoints[i].m_Curvetype], 0, &v, 0, Localize("Switch curve type"))) + if(DoButton_Editor(pID, paTypeName[pEnvelope->m_lPoints[i].m_Curvetype], 0, &v, 0, "Switch curve type")) pEnvelope->m_lPoints[i].m_Curvetype = (pEnvelope->m_lPoints[i].m_Curvetype+1)%NUM_CURVETYPES; } } @@ -2852,7 +2852,7 @@ void CEditor::RenderEnvelopeEditor(CUIRect View) ColorMod = 100.0f; Graphics()->SetColor(1,0.75f,0.75f,1); - m_pTooltip = Localize("Left mouse to drag. Hold ctrl to be more precise. Hold shift to alter time point aswell. Right click to delete."); + m_pTooltip = "Left mouse to drag. Hold ctrl to be more precise. Hold shift to alter time point aswell. Right click to delete."; } if(UI()->ActiveItem() == pID || UI()->HotItem() == pID) @@ -2887,7 +2887,7 @@ int CEditor::PopupMenuFile(CEditor *pEditor, CUIRect View) CUIRect Slot; View.HSplitTop(2.0f, &Slot, &View); View.HSplitTop(12.0f, &Slot, &View); - if(pEditor->DoButton_MenuItem(&s_NewMapButton, Localize("New"), 0, &Slot, 0, Localize("Creates a new map"))) + if(pEditor->DoButton_MenuItem(&s_NewMapButton, "New", 0, &Slot, 0, "Creates a new map")) { pEditor->Reset(); pEditor->m_aFileName[0] = 0; @@ -2896,42 +2896,42 @@ int CEditor::PopupMenuFile(CEditor *pEditor, CUIRect View) View.HSplitTop(10.0f, &Slot, &View); View.HSplitTop(12.0f, &Slot, &View); - if(pEditor->DoButton_MenuItem(&s_OpenButton, Localize("Load"), 0, &Slot, 0, Localize("Opens a map for editing"))) + if(pEditor->DoButton_MenuItem(&s_OpenButton, "Load", 0, &Slot, 0, "Opens a map for editing")) { - pEditor->InvokeFileDialog(IStorage::TYPE_ALL, FILETYPE_MAP, Localize("Load map"), Localize("Load"), "maps", "", CallbackOpenMap, pEditor); + pEditor->InvokeFileDialog(IStorage::TYPE_ALL, FILETYPE_MAP, "Load map", "Load", "maps", "", CallbackOpenMap, pEditor); return 1; } View.HSplitTop(10.0f, &Slot, &View); View.HSplitTop(12.0f, &Slot, &View); - if(pEditor->DoButton_MenuItem(&s_AppendButton, Localize("Append"), 0, &Slot, 0, Localize("Opens a map and adds everything from that map to the current one"))) + if(pEditor->DoButton_MenuItem(&s_AppendButton, "Append", 0, &Slot, 0, "Opens a map and adds everything from that map to the current one")) { - pEditor->InvokeFileDialog(IStorage::TYPE_ALL, FILETYPE_MAP, Localize("Append map"), Localize("Append"), "maps", "", CallbackAppendMap, pEditor); + pEditor->InvokeFileDialog(IStorage::TYPE_ALL, FILETYPE_MAP, "Append map", "Append", "maps", "", CallbackAppendMap, pEditor); return 1; } View.HSplitTop(10.0f, &Slot, &View); View.HSplitTop(12.0f, &Slot, &View); - if(pEditor->DoButton_MenuItem(&s_SaveButton, Localize("Save"), 0, &Slot, 0, Localize("Saves the current map"))) + if(pEditor->DoButton_MenuItem(&s_SaveButton, "Save", 0, &Slot, 0, "Saves the current map")) { if(pEditor->m_aFileName[0] && pEditor->m_ValidSaveFilename) CallbackSaveMap(pEditor->m_aFileName, IStorage::TYPE_SAVE, pEditor); else - pEditor->InvokeFileDialog(IStorage::TYPE_SAVE, FILETYPE_MAP, Localize("Save map"), Localize("Save"), "maps", "", CallbackSaveMap, pEditor); + pEditor->InvokeFileDialog(IStorage::TYPE_SAVE, FILETYPE_MAP, "Save map", "Save", "maps", "", CallbackSaveMap, pEditor); return 1; } View.HSplitTop(2.0f, &Slot, &View); View.HSplitTop(12.0f, &Slot, &View); - if(pEditor->DoButton_MenuItem(&s_SaveAsButton, Localize("Save As"), 0, &Slot, 0, Localize("Saves the current map under a new name"))) + if(pEditor->DoButton_MenuItem(&s_SaveAsButton, "Save As", 0, &Slot, 0, "Saves the current map under a new name")) { - pEditor->InvokeFileDialog(IStorage::TYPE_SAVE, FILETYPE_MAP, Localize("Save map"), Localize("Save"), "maps", "", CallbackSaveMap, pEditor); + pEditor->InvokeFileDialog(IStorage::TYPE_SAVE, FILETYPE_MAP, "Save map", "Save", "maps", "", CallbackSaveMap, pEditor); return 1; } View.HSplitTop(10.0f, &Slot, &View); View.HSplitTop(12.0f, &Slot, &View); - if(pEditor->DoButton_MenuItem(&s_ExitButton, Localize("Exit"), 0, &Slot, 0, Localize("Exits from the editor"))) + if(pEditor->DoButton_MenuItem(&s_ExitButton, "Exit", 0, &Slot, 0, "Exits from the editor")) { g_Config.m_ClEditor = 0; return 1; @@ -2945,7 +2945,7 @@ void CEditor::RenderMenubar(CUIRect MenuBar) static CUIRect s_File /*, view, help*/; MenuBar.VSplitLeft(60.0f, &s_File, &MenuBar); - if(DoButton_Menu(&s_File, Localize("File"), 0, &s_File, 0, 0)) + if(DoButton_Menu(&s_File, "File", 0, &s_File, 0, 0)) UiInvokePopupMenu(&s_File, 1, s_File.x, s_File.y+s_File.h-1.0f, 120, 150, PopupMenuFile, this); /* @@ -2962,7 +2962,7 @@ void CEditor::RenderMenubar(CUIRect MenuBar) MenuBar.VSplitLeft(40.0f, 0, &MenuBar); char aBuf[128]; - str_format(aBuf, sizeof(aBuf), Localize("File: %s"), m_aFileName); + str_format(aBuf, sizeof(aBuf), "File: %s", m_aFileName); UI()->DoLabel(&MenuBar, aBuf, 10.0f, -1, -1); } diff --git a/src/game/editor/ed_layer_quads.cpp b/src/game/editor/ed_layer_quads.cpp index 0aa58ac5..c1b36661 100644 --- a/src/game/editor/ed_layer_quads.cpp +++ b/src/game/editor/ed_layer_quads.cpp @@ -223,7 +223,7 @@ int CLayerQuads::RenderProperties(CUIRect *pToolBox) }; CProperty aProps[] = { - {Localize("Image"), m_Image, PROPTYPE_IMAGE, -1, 0}, + {"Image", m_Image, PROPTYPE_IMAGE, -1, 0}, {0}, }; diff --git a/src/game/editor/ed_layer_tiles.cpp b/src/game/editor/ed_layer_tiles.cpp index e26d98bd..d679512d 100644 --- a/src/game/editor/ed_layer_tiles.cpp +++ b/src/game/editor/ed_layer_tiles.cpp @@ -365,7 +365,7 @@ int CLayerTiles::RenderProperties(CUIRect *pToolBox) if(InGameGroup) { static int s_ColclButton = 0; - if(m_pEditor->DoButton_Editor(&s_ColclButton, Localize("Game tiles"), 0, &Button, 0, Localize("Constructs game tiles from this layer"))) + if(m_pEditor->DoButton_Editor(&s_ColclButton, "Game tiles", 0, &Button, 0, "Constructs game tiles from this layer")) m_pEditor->PopupSelectGametileOpInvoke(m_pEditor->UI()->MouseX(), m_pEditor->UI()->MouseY()); int Result = m_pEditor->PopupSelectGameTileOpResult(); @@ -400,11 +400,11 @@ int CLayerTiles::RenderProperties(CUIRect *pToolBox) Color |= m_Color.a; CProperty aProps[] = { - {Localize("Width"), m_Width, PROPTYPE_INT_SCROLL, 1, 1000000000}, - {Localize("Height"), m_Height, PROPTYPE_INT_SCROLL, 1, 1000000000}, - {Localize("Shift"), 0, PROPTYPE_SHIFT, 0, 0}, - {Localize("Image"), m_Image, PROPTYPE_IMAGE, 0, 0}, - {Localize("Color"), Color, PROPTYPE_COLOR, 0, 0}, + {"Width", m_Width, PROPTYPE_INT_SCROLL, 1, 1000000000}, + {"Height", m_Height, PROPTYPE_INT_SCROLL, 1, 1000000000}, + {"Shift", 0, PROPTYPE_SHIFT, 0, 0}, + {"Image", m_Image, PROPTYPE_IMAGE, 0, 0}, + {"Color", Color, PROPTYPE_COLOR, 0, 0}, {0}, }; diff --git a/src/game/editor/ed_popups.cpp b/src/game/editor/ed_popups.cpp index c34a1b1b..d504bee6 100644 --- a/src/game/editor/ed_popups.cpp +++ b/src/game/editor/ed_popups.cpp @@ -89,7 +89,7 @@ int CEditor::PopupGroup(CEditor *pEditor, CUIRect View) // don't allow deletion of game group if(pEditor->m_Map.m_pGameGroup != pEditor->GetSelectedGroup()) { - if(pEditor->DoButton_Editor(&s_DeleteButton, Localize("Delete group"), 0, &Button, 0, Localize("Delete group"))) + if(pEditor->DoButton_Editor(&s_DeleteButton, "Delete group", 0, &Button, 0, "Delete group")) { pEditor->m_Map.DeleteGroup(pEditor->m_SelectedGroup); pEditor->m_SelectedGroup = max(0, pEditor->m_SelectedGroup-1); @@ -98,7 +98,7 @@ int CEditor::PopupGroup(CEditor *pEditor, CUIRect View) } else { - if(pEditor->DoButton_Editor(&s_DeleteButton, Localize("Clean-up game tiles"), 0, &Button, 0, Localize("Removes game tiles that aren't based on a layer"))) + if(pEditor->DoButton_Editor(&s_DeleteButton, "Clean-up game tiles", 0, &Button, 0, "Removes game tiles that aren't based on a layer")) { // gather all tile layers array<CLayerTiles*> Layers; @@ -138,7 +138,7 @@ int CEditor::PopupGroup(CEditor *pEditor, CUIRect View) View.HSplitBottom(10.0f, &View, &Button); View.HSplitBottom(12.0f, &View, &Button); static int s_NewQuadLayerButton = 0; - if(pEditor->DoButton_Editor(&s_NewQuadLayerButton, Localize("Add quads layer"), 0, &Button, 0, Localize("Creates a new quad layer"))) + if(pEditor->DoButton_Editor(&s_NewQuadLayerButton, "Add quads layer", 0, &Button, 0, "Creates a new quad layer")) { CLayer *l = new CLayerQuads; l->m_pEditor = pEditor; @@ -151,7 +151,7 @@ int CEditor::PopupGroup(CEditor *pEditor, CUIRect View) View.HSplitBottom(5.0f, &View, &Button); View.HSplitBottom(12.0f, &View, &Button); static int s_NewTileLayerButton = 0; - if(pEditor->DoButton_Editor(&s_NewTileLayerButton, Localize("Add tile layer"), 0, &Button, 0, Localize("Creates a new tile layer"))) + if(pEditor->DoButton_Editor(&s_NewTileLayerButton, "Add tile layer", 0, &Button, 0, "Creates a new tile layer")) { CLayer *l = new CLayerTiles(50, 50); l->m_pEditor = pEditor; @@ -176,17 +176,17 @@ int CEditor::PopupGroup(CEditor *pEditor, CUIRect View) }; CProperty aProps[] = { - {Localize("Order"), pEditor->m_SelectedGroup, PROPTYPE_INT_STEP, 0, pEditor->m_Map.m_lGroups.size()-1}, - {Localize("Pos X"), -pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_OffsetX, PROPTYPE_INT_SCROLL, -1000000, 1000000}, - {Localize("Pos Y"), -pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_OffsetY, PROPTYPE_INT_SCROLL, -1000000, 1000000}, - {Localize("Para X"), pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_ParallaxX, PROPTYPE_INT_SCROLL, -1000000, 1000000}, - {Localize("Para Y"), pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_ParallaxY, PROPTYPE_INT_SCROLL, -1000000, 1000000}, - - {Localize("Use Clipping"), pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_UseClipping, PROPTYPE_BOOL, 0, 1}, - {Localize("Clip X"), pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_ClipX, PROPTYPE_INT_SCROLL, -1000000, 1000000}, - {Localize("Clip Y"), pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_ClipY, PROPTYPE_INT_SCROLL, -1000000, 1000000}, - {Localize("Clip W"), pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_ClipW, PROPTYPE_INT_SCROLL, -1000000, 1000000}, - {Localize("Clip H"), pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_ClipH, PROPTYPE_INT_SCROLL, -1000000, 1000000}, + {"Order", pEditor->m_SelectedGroup, PROPTYPE_INT_STEP, 0, pEditor->m_Map.m_lGroups.size()-1}, + {"Pos X", -pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_OffsetX, PROPTYPE_INT_SCROLL, -1000000, 1000000}, + {"Pos Y", -pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_OffsetY, PROPTYPE_INT_SCROLL, -1000000, 1000000}, + {"Para X", pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_ParallaxX, PROPTYPE_INT_SCROLL, -1000000, 1000000}, + {"Para Y", pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_ParallaxY, PROPTYPE_INT_SCROLL, -1000000, 1000000}, + + {"Use Clipping", pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_UseClipping, PROPTYPE_BOOL, 0, 1}, + {"Clip X", pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_ClipX, PROPTYPE_INT_SCROLL, -1000000, 1000000}, + {"Clip Y", pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_ClipY, PROPTYPE_INT_SCROLL, -1000000, 1000000}, + {"Clip W", pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_ClipW, PROPTYPE_INT_SCROLL, -1000000, 1000000}, + {"Clip H", pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->m_ClipH, PROPTYPE_INT_SCROLL, -1000000, 1000000}, {0}, }; @@ -227,7 +227,7 @@ int CEditor::PopupLayer(CEditor *pEditor, CUIRect View) // don't allow deletion of game layer if(pEditor->m_Map.m_pGameLayer != pEditor->GetSelectedLayer(0) && - pEditor->DoButton_Editor(&s_DeleteButton, Localize("Delete layer"), 0, &Button, 0, Localize("Deletes the layer"))) + pEditor->DoButton_Editor(&s_DeleteButton, "Delete layer", 0, &Button, 0, "Deletes the layer")) { pEditor->m_Map.m_lGroups[pEditor->m_SelectedGroup]->DeleteLayer(pEditor->m_SelectedLayer); return 1; @@ -247,9 +247,9 @@ int CEditor::PopupLayer(CEditor *pEditor, CUIRect View) }; CProperty aProps[] = { - {Localize("Group"), pEditor->m_SelectedGroup, PROPTYPE_INT_STEP, 0, pEditor->m_Map.m_lGroups.size()-1}, - {Localize("Order"), pEditor->m_SelectedLayer, PROPTYPE_INT_STEP, 0, pCurrentGroup->m_lLayers.size()}, - {Localize("Detail"), pCurrentLayer->m_Flags&LAYERFLAG_DETAIL, PROPTYPE_BOOL, 0, 1}, + {"Group", pEditor->m_SelectedGroup, PROPTYPE_INT_STEP, 0, pEditor->m_Map.m_lGroups.size()-1}, + {"Order", pEditor->m_SelectedLayer, PROPTYPE_INT_STEP, 0, pCurrentGroup->m_lLayers.size()}, + {"Detail", pCurrentLayer->m_Flags&LAYERFLAG_DETAIL, PROPTYPE_BOOL, 0, 1}, {0}, }; @@ -294,7 +294,7 @@ int CEditor::PopupQuad(CEditor *pEditor, CUIRect View) // delete button View.HSplitBottom(12.0f, &View, &Button); static int s_DeleteButton = 0; - if(pEditor->DoButton_Editor(&s_DeleteButton, Localize("Delete"), 0, &Button, 0, Localize("Deletes the current quad"))) + if(pEditor->DoButton_Editor(&s_DeleteButton, "Delete", 0, &Button, 0, "Deletes the current quad")) { CLayerQuads *pLayer = (CLayerQuads *)pEditor->GetSelectedLayerType(0, LAYERTYPE_QUADS); if(pLayer) @@ -313,7 +313,7 @@ int CEditor::PopupQuad(CEditor *pEditor, CUIRect View) { View.HSplitBottom(12.0f, &View, &Button); static int s_AspectRatioButton = 0; - if(pEditor->DoButton_Editor(&s_AspectRatioButton, Localize("Aspect ratio"), 0, &Button, 0, Localize("Resizes the current Quad based on the aspect ratio of the image"))) + if(pEditor->DoButton_Editor(&s_AspectRatioButton, "Aspect ratio", 0, &Button, 0, "Resizes the current Quad based on the aspect ratio of the image")) { int Top = pQuad->m_aPoints[0].y; int Left = pQuad->m_aPoints[0].x; @@ -341,7 +341,7 @@ int CEditor::PopupQuad(CEditor *pEditor, CUIRect View) // square button View.HSplitBottom(12.0f, &View, &Button); static int s_Button = 0; - if(pEditor->DoButton_Editor(&s_Button, Localize("Square"), 0, &Button, 0, Localize("Squares the current quad"))) + if(pEditor->DoButton_Editor(&s_Button, "Square", 0, &Button, 0, "Squares the current quad")) { int Top = pQuad->m_aPoints[0].y; int Left = pQuad->m_aPoints[0].x; @@ -374,10 +374,10 @@ int CEditor::PopupQuad(CEditor *pEditor, CUIRect View) }; CProperty aProps[] = { - {Localize("Pos. Env"), pQuad->m_PosEnv+1, PROPTYPE_INT_STEP, 0, pEditor->m_Map.m_lEnvelopes.size()+1}, - {Localize("Pos. TO"), pQuad->m_PosEnvOffset, PROPTYPE_INT_SCROLL, -1000000, 1000000}, - {Localize("Color Env"), pQuad->m_ColorEnv+1, PROPTYPE_INT_STEP, 0, pEditor->m_Map.m_lEnvelopes.size()+1}, - {Localize("Color TO"), pQuad->m_ColorEnvOffset, PROPTYPE_INT_SCROLL, -1000000, 1000000}, + {"Pos. Env", pQuad->m_PosEnv+1, PROPTYPE_INT_STEP, 0, pEditor->m_Map.m_lEnvelopes.size()+1}, + {"Pos. TO", pQuad->m_PosEnvOffset, PROPTYPE_INT_SCROLL, -1000000, 1000000}, + {"Color Env", pQuad->m_ColorEnv+1, PROPTYPE_INT_STEP, 0, pEditor->m_Map.m_lEnvelopes.size()+1}, + {"Color TO", pQuad->m_ColorEnvOffset, PROPTYPE_INT_SCROLL, -1000000, 1000000}, {0}, }; @@ -420,7 +420,7 @@ int CEditor::PopupPoint(CEditor *pEditor, CUIRect View) CProperty aProps[] = { - {Localize("Color"), Color, PROPTYPE_COLOR, -1, pEditor->m_Map.m_lEnvelopes.size()}, + {"Color", Color, PROPTYPE_COLOR, -1, pEditor->m_Map.m_lEnvelopes.size()}, {0}, }; @@ -469,7 +469,7 @@ int CEditor::PopupSelectImage(CEditor *pEditor, CUIRect View) if(i == -1) { - if(pEditor->DoButton_MenuItem(&pEditor->m_Map.m_lImages[i], Localize("None"), i==g_SelectImageCurrent, &Button)) + if(pEditor->DoButton_MenuItem(&pEditor->m_Map.m_lImages[i], "None", i==g_SelectImageCurrent, &Button)) g_SelectImageSelected = -1; } else @@ -513,8 +513,6 @@ static int s_GametileOpSelected = -1; int CEditor::PopupSelectGametileOp(CEditor *pEditor, CUIRect View) { - /* This is for scripts/update_localization.py to work, don't remove! - Localize("Clear"); Localize("Collision"); Localize("Death"); Localize("Unhookable"); */ static const char *s_pButtonNames[] = { "Clear", "Collision", "Death", "Unhookable" }; static unsigned s_NumButtons = sizeof(s_pButtonNames) / sizeof(char*); CUIRect Button; @@ -523,7 +521,7 @@ int CEditor::PopupSelectGametileOp(CEditor *pEditor, CUIRect View) { View.HSplitTop(2.0f, 0, &View); View.HSplitTop(12.0f, &Button, &View); - if(pEditor->DoButton_Editor(&s_pButtonNames[i], Localize(s_pButtonNames[i]), 0, &Button, 0, 0)) + if(pEditor->DoButton_Editor(&s_pButtonNames[i], s_pButtonNames[i], 0, &Button, 0, 0)) s_GametileOpSelected = i; } |