Skip to content

Commit 33ae25a

Browse files
qweasdd136963revolucas
authored andcommitted
~ Should be float
+ SetTextureEx exported to lua for CUIStatic, which allows setting shader name as second param = UIDragDropListEx | Fix improper use of std::unique. The idea is to cull cells of same dimensions or less for drawing but this optimization did not work due to this error. Co-Authored-By: Revo Lucas <revolucas@gmail.com>
1 parent 40fc8b4 commit 33ae25a

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

src/Layers/xrRenderPC_R1/FStaticRender_RenderTarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ CRenderTarget::CRenderTarget()
2828
param_color_map_influence = 0.0f;
2929
param_color_map_interpolate = 0.0f;
3030

31-
im_noise_time = 1 / 100.0f;
31+
im_noise_time = 1.f / 100.0f;
3232
im_noise_shift_w = 0;
3333
im_noise_shift_h = 0;
3434

src/Layers/xrRenderPC_R2/r2_rendertarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ CRenderTarget::CRenderTarget()
196196
param_noise_fps = 25.f;
197197
param_noise_scale = 1.f;
198198

199-
im_noise_time = 1 / 100.0f;
199+
im_noise_time = 1.f / 100.0f;
200200
im_noise_shift_w = 0;
201201
im_noise_shift_h = 0;
202202

src/Layers/xrRenderPC_R3/r3_rendertarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ CRenderTarget::CRenderTarget()
292292
param_noise_fps = 25.f;
293293
param_noise_scale = 1.f;
294294

295-
im_noise_time = 1 / 100.0f;
295+
im_noise_time = 1.f / 100.0f;
296296
im_noise_shift_w = 0;
297297
im_noise_shift_h = 0;
298298

src/Layers/xrRenderPC_R4/r4_rendertarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ CRenderTarget::CRenderTarget()
294294
param_noise_fps = 25.f;
295295
param_noise_scale = 1.f;
296296

297-
im_noise_time = 1 / 100.0f;
297+
im_noise_time = 1.f / 100.0f;
298298
im_noise_shift_w = 0;
299299
im_noise_shift_h = 0;
300300

src/xrGame/ui/UIDragDropListEx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ u32 CUICellContainer::GetCellsInRange(const Irect& rect, UI_CELLS_VEC& res)
743743
for (int y = rect.y1; y <= rect.y2; ++y)
744744
res.push_back(GetCellAt(Ivector2().set(x, y)));
745745

746-
std::unique(res.begin(), res.end());
746+
res.erase(std::unique(res.begin(), res.end()), res.end());
747747
return res.size();
748748
}
749749

src/xrGame/ui/UIStatic_script.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ SCRIPT_EXPORT(CUIStatic, (CUIWindow), {
2020
.def(constructor<>())
2121
.def("TextControl", &CUIStatic::TextItemControl)
2222
.def("InitTexture", &CUIStatic::InitTexture)
23+
.def("InitTextureEx", &CUIStatic::InitTextureEx)
2324
.def("SetTextureRect", &CUIStatic::SetTextureRect_script)
2425
.def("SetStretchTexture", &CUIStatic::SetStretchTexture)
2526
.def("GetTextureRect", &CUIStatic::GetTextureRect_script)];

0 commit comments

Comments
 (0)