Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "stdafx.h"

#include "Headers/PropertyWindow.h"

namespace Divide {
    PropertyWindow::PropertyWindow(PanelManager& parent)
        : DockedWindow(parent, "Properties")
    {

    }

    PropertyWindow::~PropertyWindow()
    {

    }

    void PropertyWindow::draw() {
        ImGui::Text("%s\n",_name.c_str());
#ifdef TEST_ICONS_INSIDE_TTF
        ImGui::Spacing();ImGui::Separator();
        ImGui::TextDisabled("Testing icons inside FontAwesome");
        ImGui::Separator();ImGui::Spacing();

        ImGui::Button(ICON_FA_FILE "  File"); // use string literal concatenation, ouputs a file icon and File
#   ifndef NO_IMGUIFILESYSTEM // Testing icons inside ImGuiFs::Dialog
        ImGui::AlignFirstTextHeightToWidgets();ImGui::Text("File:");ImGui::SameLine();
        static ImGuiFs::Dialog dlg;
        ImGui::InputText("###fsdlg", (char*)dlg.getChosenPath(), ImGuiFs::MAX_PATH_BYTES, ImGuiInputTextFlags_ReadOnly);
        ImGui::SameLine();
        const bool browseButtonPressed = ImGui::Button("...##fsdlg");
        if (ImGui::IsItemHovered()) ImGui::SetTooltip("%s", "file chooser dialog\nwith FontAwesome icons");
        dlg.chooseFileDialog(browseButtonPressed, dlg.getLastDirectory());
#   endif //NO_IMGUIFILESYSTEM
        if (ImGui::TreeNode("All FontAwesome Icons")) {
            DrawAllFontAwesomeIcons();
            ImGui::TreePop();
        }

        ImGui::Spacing();ImGui::Separator();
        ImGui::TextDisabled("Testing styled check boxes by dougbinks");
        if (ImGui::IsItemHovered()) ImGui::SetTooltip("%s", "https://gist.github.com/dougbinks/8089b4bbaccaaf6fa204236978d165a9\nThey work better with a Monospace font");
        ImGui::Separator();ImGui::Spacing();

        static bool cb1 = false;ImGui::CheckBoxFont("CheckBoxFont", &cb1);
        static bool cb2 = false;ImGui::CheckBoxTick("CheckBoxTick", &cb2);
        static bool cb3 = false;ImGui::MenuItemCheckBox("MenuItemCheckBox", &cb3);
        if (ImGui::IsItemHovered()) ImGui::SetTooltip("%s", "Probably this works only\ninside a Menu...");


        // We, we can use default fonts as well (std UTF8 chars):
        ImGui::Spacing();ImGui::Separator();
        ImGui::TextDisabled("Testing the same without any icon font");
        ImGui::Separator();ImGui::Spacing();

        static bool cb4 = false;ImGui::CheckBoxFont("CheckBoxDefaultFonts", &cb4, "▣", "□");
        static bool cb5 = false;ImGui::CheckBoxFont("CheckBoxDefaultFonts2", &cb5, "■", "□");
        static bool cb6 = false;ImGui::CheckBoxFont("CheckBoxDefaultFonts3", &cb6, "▼", "▶");
        static bool cb7 = false;ImGui::CheckBoxFont("CheckBoxDefaultFonts4", &cb7, "▽", "▷");
#endif //TEST_ICONS_INSIDE_TTF
    }
};

Commits for Divide-Framework/trunk/Source Code/Editor/Widgets/DockedWindows/PropertyWindow.cpp

Diff revisions: vs.
Revision Author Commited Message
1022 IonutCava picture IonutCava Thu 25 Jan, 2018 16:13:30 +0000

[Ionut]
- Editor work: move docked windows to their own classes and files