Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RoFIbots
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marek Trtík
RoFIbots
Commits
466f5867
There was an error fetching the commit references. Please try again later.
Commit
466f5867
authored
10 months ago
by
Martin Štourač
Browse files
Options
Downloads
Patches
Plain Diff
rename build toolbar components
parent
cafe9f88
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/gui/include/gui/ui.hpp
+1
-0
1 addition, 0 deletions
src/gui/include/gui/ui.hpp
src/gui/src/ui.cpp
+13
-7
13 additions, 7 deletions
src/gui/src/ui.cpp
with
14 additions
and
7 deletions
src/gui/include/gui/ui.hpp
+
1
−
0
View file @
466f5867
...
...
@@ -16,6 +16,7 @@
static
const
float
mode_toolbar_width
=
275.0
f
;
static
const
float
mode_toolbar_height
=
40.0
f
;
static
const
float
build_toolbar_width
=
400.0
f
;
static
const
float
build_toolbar_button_width
=
90.0
f
;
static
const
float
build_toolbar_height
=
40.0
f
;
void
show_ui
(
const
osi
::
Window
&
window
,
edit
::
UIData
&
data
,
const
double
&
current_second
);
...
...
This diff is collapsed.
Click to expand it.
src/gui/src/ui.cpp
+
13
−
7
View file @
466f5867
...
...
@@ -402,9 +402,15 @@ void mode_II_build_selection_ui(const osi::Window &window, edit::UIData &data)
void
build_toolbar_ui
(
const
osi
::
Window
&
window
,
edit
::
UIData
&
data
)
{
auto
window_pos_x
=
window
.
size
().
x
*
0.5
f
-
build_toolbar_width
*
0.5
f
;
ImGui
::
SetNextWindowPos
(
ImVec2
(
window_pos_x
,
window
.
size
().
y
-
build_toolbar_height
));
ImGui
::
SetNextWindowSize
(
ImVec2
(
build_toolbar_width
,
build_toolbar_height
));
// auto window_pos_x =window.size().x * 0.5f - build_toolbar_width * 0.5f;
if
(
data
.
allowed_components
.
empty
())
return
;
float
size_x
=
static_cast
<
float
>
(
window
.
size
().
x
);
float
size_y
=
static_cast
<
float
>
(
window
.
size
().
y
);
ImGui
::
SetNextWindowPos
(
ImVec2
(
size_x
*
0.5
f
,
size_y
),
ImGuiCond_Always
,
ImVec2
(
0.5
f
,
1.0
f
));
ImGui
::
SetNextWindowSize
(
ImVec2
(
build_toolbar_button_width
*
data
.
allowed_components
.
size
(),
build_toolbar_height
));
ImGuiWindowFlags
window_flags
=
0
|
ImGuiWindowFlags_NoTitleBar
...
...
@@ -429,11 +435,11 @@ void build_toolbar_buttons(edit::UIData &data)
set_build_toolbar_button_colors
(
data
);
std
::
map
<
component
,
const
char
*>
buttons
=
{
{
component
::
voxel
,
"
Voxel
"
},
{
component
::
voxel
,
"
Cube
"
},
{
component
::
fixed_con
,
"Fixed"
},
{
component
::
open_con
,
"
Open
"
},
{
component
::
rotation_con
,
"
Rot
"
},
{
component
::
shared_rotation_con
,
"
Shrd Ro
t"
}
{
component
::
open_con
,
"
RoFICoM
"
},
{
component
::
rotation_con
,
"
Shoe
"
},
{
component
::
shared_rotation_con
,
"
Body Join
t"
}
};
for
(
auto
&
comp
:
data
.
allowed_components
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment