mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
Removed unneeded input consume, HD remaster images now work in the placement editor.
This commit is contained in:
@@ -1594,7 +1594,7 @@ void MapEditClass::Main_Menu(void)
|
||||
Show_Mouse();
|
||||
|
||||
if (UnknownKey==KN_ESC || g_globalKeyNumType == KN_RMOUSE) {
|
||||
// jmarshall - consume the RMOUSE DOWN
|
||||
// jmarshall - consume the RMOUSE DOWN so it doesn't bring up the context menu again.
|
||||
Buttons->Input();
|
||||
// jmarshall end
|
||||
break;
|
||||
|
||||
@@ -454,9 +454,20 @@ int MapEditClass::Placement_Dialog(void)
|
||||
WindowList[WINDOW_EDITOR][WINDOWHEIGHT] = D_PICTURE_H;
|
||||
Change_Window((int)WINDOW_EDITOR);
|
||||
// Draw_Box(D_PICTURE_X, D_PICTURE_Y, D_PICTURE_W, D_PICTURE_H, BOXSTYLE_DOWN, false);
|
||||
curobj->Display(WinW/2, WinH>>1, WINDOW_EDITOR, LastHouse);
|
||||
//curobj->Display(WinW/2, WinH>>1, WINDOW_EDITOR, LastHouse);
|
||||
// curobj->Display(WinW<<2, WinH>>1, WINDOW_EDITOR, LastHouse);
|
||||
|
||||
Image_t* image = NULL;
|
||||
if (curobj->Get_HDImage_Data()) {
|
||||
image = curobj->Get_HDImage_Data();
|
||||
GL_RenderForeGroundImage(image, 30, 100, 75, 75);
|
||||
}
|
||||
//else {
|
||||
// image = (Image_t *)curobj->Get_Image_Data();
|
||||
//}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Erase the grid
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,22 @@ void GL_RenderImage(Image_t* image, int x, int y, int width, int height, int col
|
||||
|
||||
}
|
||||
|
||||
void GL_RenderForeGroundImage(Image_t* image, int x, int y, int width, int height, int colorRemap, int shapeId) {
|
||||
ImVec2 mi(x, y);
|
||||
ImVec2 ma(x + width, y + height);
|
||||
|
||||
if (image->numFrames > 0) {
|
||||
if (image->HouseImages[colorRemap].image[shapeId][((int)animFrameNum) % image->numFrames] == 0)
|
||||
ImGui::GetForegroundDrawList()->AddImage((ImTextureID)image->HouseImages[colorRemap].image[shapeId][0], mi, ma);
|
||||
else
|
||||
ImGui::GetForegroundDrawList()->AddImage((ImTextureID)image->HouseImages[colorRemap].image[shapeId][((int)animFrameNum) % image->numFrames], mi, ma);
|
||||
}
|
||||
else {
|
||||
ImGui::GetForegroundDrawList()->AddImage((ImTextureID)image->HouseImages[colorRemap].image[shapeId][0], mi, ma);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void GL_FillRect(int color, int x, int y, int width, int height) {
|
||||
ImVec2 mi(x, y);
|
||||
ImVec2 ma(x + width, y + height);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
struct Image_t;
|
||||
void GL_RenderImage(Image_t* image, int x, int y, int width, int height, int colorRemap = 0, int shapeId = 0);
|
||||
void GL_RenderForeGroundImage(Image_t* image, int x, int y, int width, int height, int colorRemap = 0, int shapeId = 0);
|
||||
void GL_DrawText(int color, int x, int y, char* text);
|
||||
void GL_FillRect(int color, int x, int y, int width, int height);
|
||||
void GL_DrawLine(int color, int x, int y, int dx, int dy);
|
||||
|
||||
Reference in New Issue
Block a user