Skip to content

Commit

Permalink
~ Should be float
Browse files Browse the repository at this point in the history
+ 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 <[email protected]>
  • Loading branch information
2 people authored and Xottab-DUTY committed Jun 3, 2018
1 parent 40fc8b4 commit 33ae25a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Layers/xrRenderPC_R1/FStaticRender_RenderTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ CRenderTarget::CRenderTarget()
param_color_map_influence = 0.0f;
param_color_map_interpolate = 0.0f;

im_noise_time = 1 / 100.0f;
im_noise_time = 1.f / 100.0f;
im_noise_shift_w = 0;
im_noise_shift_h = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRenderPC_R2/r2_rendertarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ CRenderTarget::CRenderTarget()
param_noise_fps = 25.f;
param_noise_scale = 1.f;

im_noise_time = 1 / 100.0f;
im_noise_time = 1.f / 100.0f;
im_noise_shift_w = 0;
im_noise_shift_h = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRenderPC_R3/r3_rendertarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ CRenderTarget::CRenderTarget()
param_noise_fps = 25.f;
param_noise_scale = 1.f;

im_noise_time = 1 / 100.0f;
im_noise_time = 1.f / 100.0f;
im_noise_shift_w = 0;
im_noise_shift_h = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRenderPC_R4/r4_rendertarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ CRenderTarget::CRenderTarget()
param_noise_fps = 25.f;
param_noise_scale = 1.f;

im_noise_time = 1 / 100.0f;
im_noise_time = 1.f / 100.0f;
im_noise_shift_w = 0;
im_noise_shift_h = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/ui/UIDragDropListEx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ u32 CUICellContainer::GetCellsInRange(const Irect& rect, UI_CELLS_VEC& res)
for (int y = rect.y1; y <= rect.y2; ++y)
res.push_back(GetCellAt(Ivector2().set(x, y)));

std::unique(res.begin(), res.end());
res.erase(std::unique(res.begin(), res.end()), res.end());
return res.size();
}

Expand Down
1 change: 1 addition & 0 deletions src/xrGame/ui/UIStatic_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ SCRIPT_EXPORT(CUIStatic, (CUIWindow), {
.def(constructor<>())
.def("TextControl", &CUIStatic::TextItemControl)
.def("InitTexture", &CUIStatic::InitTexture)
.def("InitTextureEx", &CUIStatic::InitTextureEx)
.def("SetTextureRect", &CUIStatic::SetTextureRect_script)
.def("SetStretchTexture", &CUIStatic::SetStretchTexture)
.def("GetTextureRect", &CUIStatic::GetTextureRect_script)];
Expand Down

0 comments on commit 33ae25a

Please sign in to comment.