A thread about long cats because there is no spoiler tag.
---
viewtopic.php?f=23&t=33190&p=567220#p567220
I see "hideinterface 1" similiar as other commands:
Common usage is to turn something off so that a widget can draw its own custom version.
/resbars 0 for resource displays.
/console 0 for chat widgets.
etc.
Sometimes one might want to turn off and custom-draw everything (for menus or game-over screens) and for such cases "hideinterface 1" is imo perfectly okay.
Also easier to reset everything to its previous state.
gl.ConfigMiniMap(0,0,0,0) will work but leave a small group of pixels
If in slave mode the pixels could be drawn manually;
Those pixels are the border of the minimap. It remains visible even when the minimap is "zero-sized." It is just a small unwanted artifact, why manually red-add it when goal was to get rid of the minimap.
"slaveMode" fixes that because it disables drawing the border (together with all other drawing)
Game/GUI/MiniMap.cpp
Code: Select all
void CMiniMap::Draw()
{
if (!slaveDrawMode) {
...draw stuff here...
}
Is it basically a configuration that says the minimap appears in the rectangle (0,0), (0,0)?
No: first 2 numbers are coordinates and last 2 numbers are size.
https://springrts.com/wiki/Lua_OpenGL_Api#Spring
rts/Lua/OpenGL.cpp
Code: Select all
int LuaOpenGL::ConfigMiniMap(lua_State* L)
{
... const int px = lua_toint(L, 1);
const int py = lua_toint(L, 2);
const int sx = lua_toint(L, 3);
const int sy = lua_toint(L, 4);
minimap->SetGeometry(px, py, sx, sy);
Game/GUI/MiniMap.cpp
Code: Select all
void CMiniMap::SetGeometry(int px, int py, int sx, int sy)
{
xpos = px;
ypos = py;
width = sx;
height = sy;
It seems one can set it to (-1,-1), (-1, -1)
Can even set it to (-1000,-666) but think it will not do much good?
Code: Select all
CMiniMap::UpdateGeometry() {
...
width = std::max(1, std::min(width, globalRendering->viewSizeX));
height = std::max(1, std::min(height, globalRendering->viewSizeY));
So smallest size seems actually to be (1,1) and not (0,0) but maybe that just to more clearly express: "I want this gone."
With position (0,0) minimap is not completly in lower left corner because it leaves space for buttons. (MiniMapButtonSize in springsettings)
There is more stuff like "endgraph 0" or the /sharedialog (H) and /quitmenu. (shift ESC)
Think those can not be hidden at all, can only block to open it.
Some commands like "info 0" save settings, that can change preference of user.
tl;dr
How chili hides everything when the default GUI is turned off is imo 'bug/wrong/missing config option' and the other ideas simply seem like workarounds for that.
Some things are not meant to be hideable but that should be decided by the widget, not by the framework...
(What use does it have if user can press F5 in a menu to make all the buttons disappear? So random!)