summaryrefslogtreecommitdiff
path: root/src/editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor.c')
-rw-r--r--src/editor.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/editor.c b/src/editor.c
index 8728564..7d7c04f 100644
--- a/src/editor.c
+++ b/src/editor.c
@@ -49,7 +49,8 @@ void SE_DrawEditor(Editor *editor, Camera2D *camera) {
DrawTexturePro(t->texture, s, d, (Vector2){0, 0}, 0.0f, WHITE);
// placing tiles
- if (IsMouseButtonDown(MOUSE_BUTTON_LEFT)) {
+ if (IsMouseButtonDown(MOUSE_BUTTON_LEFT) &&
+ GetMousePosition().x < EDITOR_TOOLKIT_X) {
EditorTile *t = NULL;
// checking for existing tiles on the position
for (int i = 0; i < editor->state.cache.tilesCount; i++) {
@@ -368,22 +369,19 @@ void drawCreatingNewBlock(Editor *editor) {
}
void SE_DrawEditorToolkit(Editor *editor) {
- float width = 400.0f;
- float height = GetScreenHeight();
- float x = GetScreenWidth() - width;
- float y = 0;
-
switch (editor->state.activeMainTab) {
case 0: {
- drawBuildTab(editor, x, y, width, height);
+ drawBuildTab(editor, EDITOR_TOOLKIT_X, EDITOR_TOOLKIT_Y,
+ EDITOR_TOOLKIT_WIDTH, EDITOR_TOOLKIT_HEIGHT);
break;
}
default:
break;
}
- GuiTabBar((Rectangle){x, y, 100.0, 24.0f}, EDITOR_MAIN_TABS,
- EDITOR_MAIN_TABS_SIZE, &editor->state.activeMainTab);
+ GuiTabBar((Rectangle){EDITOR_TOOLKIT_X, EDITOR_TOOLKIT_Y, 100.0, 24.0f},
+ EDITOR_MAIN_TABS, EDITOR_MAIN_TABS_SIZE,
+ &editor->state.activeMainTab);
// Creating new block
if (editor->state.createBlockState != NULL) {