Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Redee

Pages: [1] 2 3 ... 7
1
std::auto_ptr has since been removed anyways. Check out the master branch.  :)
Cool  ;) :)

2
Yes >>


3
Window / Re: White Window "flash" Screen - Windows 10
« on: February 22, 2020, 05:14:09 pm »
Much easier is edit WindowImplWin32.cpp
And compile system, then window

////////////////////////////////////////////////////////////
void WindowImplWin32::registerWindowClass()
{
    // ...
    //windowClass.hbrBackground = 0;
    windowClass.hbrBackground = CreateSolidBrush(RGB(0,0,0));
    // ...
}

4
Got the same error, and I feel that I must mention how I solved it for the next person that google the same error and get this thread as first result.

Problem is in one of headers you are including before <SFML/Graphics.hpp>, to chek that, move SFML/Graphics.hpp to top as first include, it should either work, or give different error message.

Thank you, in my case: Windows.h header )).

5
Window / Re: White Window "flash" Screen - Windows 10
« on: February 08, 2018, 01:35:47 pm »
Final Solution to complete remove flash.

RenderWindow win;
Event ev;
Vector2i win_Pos_Scr;
const unsigned win_sZe_Origin_X = 600;
const unsigned win_sZe_Origin_Y = 550;

win.create(VideoMode(win_sZe_Origin_X, win_sZe_Origin_Y), "ReJewel", Style::Default);
win_Pos_Scr = win.getPosition();
win.setPosition(Vector2i(-700500, -700500));

// here need do trick with resize window
win.setSize(Vector2u(1, 1));
win.setSize(Vector2u(win_sZe_Origin_X, win_sZe_Origin_Y));

win.clear();
win.display();
win.setPosition(win_Pos_Scr);

// skip to not parse resize event
while (win.pollEvent(ev)) {}

6
SFML projects / Re: ReJewel
« on: January 31, 2018, 05:22:42 pm »
I was inspired from Magic Jewelry, but some own mechanic also add.
Yes roots from Soviet Russia - and hello to Alexey Pajitnov who created first tetris.
And thank you for comments !)

7
Graphics / Re: Text wrong display position
« on: January 24, 2018, 08:26:28 pm »
Its standart Arial font.
I can manually measure offset to need me character sizes from Top / Left - but its looks like horrible decision.

Please help me normal display Text at exact pixels in window.

Okey I found - its offset in Text::getLocalBounds().

And some Topic already >> https://en.sfml-dev.org/forums/index.php?topic=20284.0

8
Graphics / Text wrong display position
« on: January 24, 2018, 08:05:29 pm »
I create simple Text with default null position and why so much offset from Top and Left ??
SFML-2.4.2-vc14-x86
Here example of code and scr >>

win.create(VideoMode(600, 550), "111", Style::Default);
win.setVerticalSyncEnabled(true);

Font font;
font.loadFromFile("Data/arial.ttf");

Event ev;
while (win.isOpen())
{
  while (win.pollEvent(ev))
  {
    if (ev.type == Event::Closed)
      win.close();
  }

  Text txt;
  txt.setFont(font);
  txt.setCharacterSize(65);
  txt.setString("D11");
 
  win.clear(Color(80, 80, 80));
  // Why so much offset ??
  win.draw(txt);
  win.display();
}


9
Window / Re: Window maximize button ?
« on: January 23, 2018, 06:31:28 pm »
Because SFML not have window maximize Event >> https://en.sfml-dev.org/forums/index.php?topic=8830.0
And I can't detect its manual resized or from Max button.

FullScreen with proportions I already have.

And Maximize not work for my logic Render, because my View is Original - not 1 to 1.
I can improve Maximize to my render logic only if detect exact sizes of visible Desktop area without Taskbar.
Maybe its help me >> http://forum.lazarus-ide.org/index.php/topic,9858.msg53098.html#msg53098

Or need simply check from window handle from WinApi Maximize status.

auto w_Hnd = win.getSystemHandle();
WINDOWPLACEMENT w_Plc;
GetWindowPlacement(w_Hnd, &w_Plc);
if (w_Plc.showCmd == SW_SHOWMAXIMIZED)
{
  // here do proportion adjustment
}


10
Window / Re: Window maximize button ?
« on: January 23, 2018, 02:57:27 pm »
So why should a user be allowed to resize the window, but not maximize it?
eXpl0it3r I have proportional window like in Don't Starve, I thought do direct ratio after maximize but seems not Event which detect it to do this.

FRex thank you for need information, will be much easy for release for my goals.

11
Window / Re: Window maximize button ?
« on: January 23, 2018, 10:23:07 am »
By removing sf::Style::Resize from the style set. But it also means that you can't manually resize the window anymore.
Me need exactly turn off this One thing. Resize need.

On Windows WinApi almost surely could do it.
Okey and how do this ???
I mean its handle window and then set something - you can help me what direct need set ?

12
Window / Window maximize button ?
« on: January 22, 2018, 10:19:44 pm »
How to disable only one maximize button ?


13
Graphics / Re: Text blur - problem
« on: January 21, 2018, 11:17:42 pm »
Thank You - will try to do this.
Yeeeeeee - its helped me!
Some magic with proportions and save sizes and View.

14
Graphics / Text blur - problem
« on: January 21, 2018, 10:38:00 am »
Texture is ok after resized window, but Text no.
How to contrast edges of Text after resize window and stay at same sf::View to window ?





Hmmmm some partical solution to solve - its set x2 bigger Char size and set 0.5f, 0.5f scale.
But some random cut edges >>



Looks like Text only one way to correct display - View to Window 1 to 1 and Text Scale (1, 1);
Or Render text from own Texture.

Or we can draw to RenderTexture, then to Image, then get need pixels and correct all which not equal Color(0,0,0,0) to One color pixel, then draw point to need coordinate to RenderTexture.

Very bad solution because too much pixels at loop need check.
For example if preRender to 32 x 32 area = 1024 iterations. Its for One character.

Very best solution is direct Render Text at One color, but in SFML not have this functionality.
Like in Photoshop - Anti-Aliasing: None >>


15
SFML projects / ReJewel
« on: January 14, 2018, 11:50:37 pm »
Всем любителям тетрисов посвящается.
Создана на C++ и SFML.

ОС: Windows 10 и выше
Жанр: Logic
Разработчик: Redee
Состояние: бета-версия
Необходимые ссылки в видео в описании !!

(click to show/hide)


Pages: [1] 2 3 ... 7
anything